Digital line zoning

This commit is contained in:
2022-06-25 14:01:19 +01:00
parent dd0afc6166
commit 81b1fa5b5e
6 changed files with 96 additions and 19 deletions
+3 -4
View File
@@ -16,8 +16,8 @@ import qualified Data.Text as T
handlePressedKeyInMenu :: ScreenLayer -> Scancode -> Universe -> IO (Maybe Universe)
handlePressedKeyInMenu mState scode = case mState of
OptionScreen { _scOptions = mos, _scDefaultEff = defeff, _scOptionsOffset = offset}
-> optionListToEffects defeff scode offset mos
OptionScreen { _scOptions = mos, _scDefaultEff = defeff}
-> optionListToEffects defeff scode mos
DisplayScreen {} -> popScreen
ColumnsScreen {} -> popScreen
WaitScreen {} -> return . Just
@@ -36,10 +36,9 @@ handlePressedKeyInMenu mState scode = case mState of
optionListToEffects
:: (Universe -> IO (Maybe Universe))
-> Scancode
-> Int
-> [MenuOption]
-> Universe -> IO (Maybe Universe)
optionListToEffects defaulteff sc offset mops u = case sc of
optionListToEffects defaulteff sc mops u = case sc of
ScancodeSpace -> return . Just
. (menuLayers . ix 0 . scOptionsOffset %~ (f . (+ mlines)))
$ u