Remove explicit scancode from menu items

This commit is contained in:
2022-11-04 08:42:30 +00:00
parent 6e7cd14f49
commit c263012b61
11 changed files with 81 additions and 85 deletions
+1
View File
@@ -17,6 +17,7 @@ data PressType = InitialPress
data Input = Input
{ _mousePos :: Point2
, _mouseMoving :: Bool
, _pressedKeys :: M.Map Scancode PressType
, _mouseButtons :: M.Map MouseButton Bool
, _scrollAmount :: Int
+2
View File
@@ -16,6 +16,7 @@ data SelectionList = SelectionList
, _slSelPos :: Maybe Int
, _slCursorType :: CursorType
, _slWidth :: SelectionWidth
, _slLength :: Int
}
data SelectionWidth = FixedSelectionWidth Int
@@ -28,6 +29,7 @@ data SelectionItem = SelectionItem
{ _siPictures :: [Picture]
, _siHeight :: Int
, _siIsSelectable :: Bool
, _siWidth :: Int
, _siColor :: Color
, _siOffX :: Int
}
+2 -5
View File
@@ -81,17 +81,14 @@ data MenuOption
= Toggle
{ _moEff :: Universe -> Universe
, _moString :: Universe -> MenuOptionDisplay
, _moKey :: Scancode
}
| Toggle2
{ _moKey1 :: Scancode
, _moEff1 :: Universe -> Universe
, _moKey2 :: Scancode
{ _moEff1 :: Universe -> Universe
, _moEff2 :: Universe -> Universe
, _moString :: Universe -> MenuOptionDisplay
}
| InvisibleToggle
{ _moKey :: Scancode
{ _moChar :: Scancode
, _moEff :: Universe -> Universe
}