This commit is contained in:
2025-06-26 12:17:08 +01:00
parent d0f20da9f1
commit ab82bcbe20
9 changed files with 103 additions and 117 deletions
+4 -24
View File
@@ -1,7 +1,6 @@
module Dodge.LevelGen.Switch (
makeSwitch,
makeButton,
makeSwitchSPic,
drawSwitchWire,
) where
@@ -21,9 +20,7 @@ makeButton ::
Button
makeButton col eff =
defaultButton
{ -- { _btEvent = ButtonPress BtInactive ButtonDoNothing click1S eff col
_btEvent = ButtonPress False eff col
-- , _btState = BtOff
{ _btEvent = ButtonPress False eff col
}
-- TODO remove duplication
@@ -41,23 +38,6 @@ drawSwitchWire col1 col2 bt
]
)
makeSwitchSPic ::
Color ->
Color ->
-- | Switch on effect
WdWd ->
-- | Switch off effect
WdWd ->
Button
makeSwitchSPic c1 c2 effOn effOff =
defaultButton & btEvent .~ ButtonSwitch effOn effOff c1 c2 False
makeSwitch ::
Color ->
Color ->
-- | Switch on effect
WdWd ->
-- | Switch off effect
WdWd ->
Button
makeSwitch col1 col2 = makeSwitchSPic col1 col2
makeSwitch :: Color -> Color -> WdWd -> WdWd -> Button
makeSwitch c1 c2 fon foff =
defaultButton & btEvent .~ ButtonSwitch fon foff c1 c2 False