This commit is contained in:
2022-06-02 10:31:22 +01:00
parent e112006b46
commit c4fc044845
7 changed files with 37 additions and 37 deletions
+3 -12
View File
@@ -18,14 +18,11 @@ makeButton
:: Color
-> (World -> World) -- ^ Effect when pressed
-> Button
makeButton col eff = Button
makeButton col eff = defaultButton
{ _btPict = defaultDrawButton col
, _btPos = V2 0 0
, _btRot = 0
, _btEvent = \b w -> eff
. over buttons (IM.adjust turnOn (_btID b))
. soundFromGeneral (LeverSound 0) (btpos b) click1S Nothing $ w
, _btID = 0
, _btText = "Button"
, _btState = BtOff
, _btTerminalParams = const NoTerminalParams
@@ -61,12 +58,9 @@ makeSwitchSPic
-> (World -> World) -- ^ Switch on effect
-> (World -> World) -- ^ Switch off effect
-> Button
makeSwitchSPic dswitch effOn effOff = Button
makeSwitchSPic dswitch effOn effOff = defaultButton
{ _btPict = dswitch
, _btPos = V2 0 0
, _btRot = 0
, _btEvent = flipSwitch
, _btID = 0
, _btText = "SWITCH/"
, _btState = BtOff
, _btTerminalParams = const NoTerminalParams
@@ -96,12 +90,9 @@ makeSwitch
-> (World -> World) -- ^ Switch on effect
-> (World -> World) -- ^ Switch off effect
-> Button
makeSwitch col1 col2 effOn effOff = Button
makeSwitch col1 col2 effOn effOff = defaultButton
{ _btPict = drawSwitch col1 col2
, _btPos = V2 0 0
, _btRot = 0
, _btEvent = flipSwitch
, _btID = 0
, _btText = "SWITCH/"
, _btState = BtOff
, _btTerminalParams = const NoTerminalParams