Move button data
This commit is contained in:
+2
-13
@@ -62,16 +62,6 @@ defaultMachine = Machine
|
||||
, _mcMounts = mempty
|
||||
, _mcCloseSound = Nothing
|
||||
}
|
||||
defaultDrawButton :: Color -> Button -> SPic
|
||||
defaultDrawButton col bt =
|
||||
( translateSHz 15 . colorSH col $ upperPrismPoly 5 buttonGeometry
|
||||
, mempty
|
||||
)
|
||||
where
|
||||
buttonGeometry
|
||||
| _btState bt == BtOff = reverse $ rectNSWE 10 (-1) (-width) width
|
||||
| otherwise = reverse $ rectNSWE 2 (-1) (-width) width
|
||||
width = 8
|
||||
defaultTerminal :: Terminal
|
||||
defaultTerminal = Terminal
|
||||
{ _tmID = 0
|
||||
@@ -100,11 +90,10 @@ defaultTerminalInput = TerminalInput
|
||||
|
||||
defaultButton :: Button
|
||||
defaultButton = Button
|
||||
{ _btPict = defaultDrawButton (dark red)
|
||||
{ _btPict = DefaultDrawButton (dark red)
|
||||
, _btPos = V2 0 0
|
||||
, _btRot = 0
|
||||
, _btEvent = \b w -> set (buttons . ix (_btID b) . btState) BtNoLabel
|
||||
. soundStart (LeverSound 0) (_btPos b) click1S Nothing $ w
|
||||
, _btEvent = ButtonPress BtNoLabel ButtonDoNothing click1S NoWorldEffect
|
||||
, _btID = 0
|
||||
, _btText = "Button"
|
||||
, _btState = BtOff
|
||||
|
||||
Reference in New Issue
Block a user