Cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user