Allow for terminals to be deactivated
This commit is contained in:
@@ -11,8 +11,7 @@ drawButton :: Button -> SPic
|
||||
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
|
||||
ButtonAccessTerminal _ -> mempty
|
||||
|
||||
drawSwitch :: Color -> Color -> Button -> SPic
|
||||
drawSwitch col1 col2 bt
|
||||
|
||||
@@ -13,7 +13,7 @@ doButtonEvent = \case
|
||||
ButtonPress False f _ -> buttonFlip f
|
||||
ButtonSwitch _ f _ _ True -> buttonFlip f
|
||||
ButtonSwitch f _ _ _ False -> buttonFlip f
|
||||
ButtonAccessTerminal -> accessTerminal . _btTermMID
|
||||
ButtonAccessTerminal tid -> const $ accessTerminal tid
|
||||
|
||||
buttonFlip :: WdWd -> Button -> World -> World
|
||||
buttonFlip f bt =
|
||||
|
||||
Reference in New Issue
Block a user