Cleanup
This commit is contained in:
+6
-6
@@ -124,8 +124,8 @@ mouseOverSelectionList ldps sl u
|
||||
hh = halfHeight cfig
|
||||
hw = halfWidth cfig
|
||||
|
||||
setSelectionListRestriction' :: Configuration -> ScreenLayer -> ScreenLayer
|
||||
setSelectionListRestriction' cfig screen = fromMaybe screen $ do
|
||||
setSelectionListRestriction :: Configuration -> ScreenLayer -> ScreenLayer
|
||||
setSelectionListRestriction cfig screen = fromMaybe screen $ do
|
||||
ldps <- screen ^? scListDisplayParams
|
||||
return $ screen & scAvailableLines %~ const (getAvailableListLines ldps cfig)
|
||||
|
||||
@@ -150,17 +150,17 @@ optionScreenUpdate ::
|
||||
Universe
|
||||
optionScreenUpdate screen mop _ ldps sl u =
|
||||
refreshOptionsSelectionList
|
||||
. optionScreenDefEff mop
|
||||
. optionScreenDefaultEffect mop
|
||||
. mouseClickOptionsList screen
|
||||
. mouseOverSelectionList ldps sl
|
||||
. menuWheelEvents
|
||||
. over (uvScreenLayers . _head) (setSelectionListRestriction' cfig)
|
||||
. over (uvScreenLayers . _head) (setSelectionListRestriction cfig)
|
||||
$ u
|
||||
where
|
||||
cfig = u ^. uvConfig
|
||||
|
||||
optionScreenDefEff :: PositionedMenuOption -> Universe -> Universe
|
||||
optionScreenDefEff f u = case u ^. uvWorld . input . pressedKeys . at ScancodeEscape of
|
||||
optionScreenDefaultEffect :: PositionedMenuOption -> Universe -> Universe
|
||||
optionScreenDefaultEffect f u = case u ^. uvWorld . input . pressedKeys . at ScancodeEscape of
|
||||
Just InitialPress -> fromMaybe id (f ^? pmoMenuOption . moEff) u
|
||||
_ -> u
|
||||
|
||||
|
||||
Reference in New Issue
Block a user