Fix switch detection, cleanup

This commit is contained in:
2025-06-25 21:49:11 +01:00
parent a9cae4d409
commit 2f130c5bed
8 changed files with 13 additions and 32 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ drawButton bt = case bt ^. btEvent of
ButtonPress {_bpColor = col} -> defaultDrawButton col bt
ButtonSwitch {_bsColor1 = col1, _bsColor2 = col2} -> drawSwitch col1 col2 bt
ButtonAccessTerminal -> mempty
ButtonDoNothing -> mempty
-- ButtonDoNothing -> mempty
drawSwitch :: Color -> Color -> Button -> SPic
drawSwitch col1 col2 bt
+1 -1
View File
@@ -8,7 +8,7 @@ import Dodge.WorldEffect
doButtonEvent :: ButtonEvent -> Button -> World -> World
doButtonEvent be = case be of
ButtonDoNothing -> const id
-- ButtonDoNothing -> const id
ButtonPress True _ _ -> const id
ButtonPress False f _ -> \b ->
doWdWd f