Update changes in menu values
This commit is contained in:
+3
-4
@@ -7,6 +7,7 @@ Description : Simulation update
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
--import Dodge.Menu.Option
|
||||
import Dodge.Menu.Option
|
||||
import Dodge.SelectionList
|
||||
import Dodge.Data.SelectionList
|
||||
import Dodge.InputFocus
|
||||
@@ -98,14 +99,12 @@ mouseClickOptionsList mos sl u = case u ^. uvWorld . input . mouseButtons . at B
|
||||
i <- sl ^. slSelPos
|
||||
si <- sl ^? slShownItems . ix i . _2
|
||||
return $ maybe u ($ u) $ case si of
|
||||
ListedSelectionItem j -> mos ^? ix j . moEff
|
||||
ScrollUpSelectionItem -> Just $ uvScreenLayers . _head . scSelectionList . slOffset %~ (max 0 . subtract 5)
|
||||
ScrollDownSelectionItem -> do
|
||||
ListedSelectionItem j -> fmap (refreshOptionsSelectionList .) (mos ^? ix j . moEff)
|
||||
ScrollSelectionItem -> do
|
||||
maxlines <- sl ^? slSizeRestriction . maxSelectionLines
|
||||
alllines <- sl ^? slLength
|
||||
Just $ uvScreenLayers . _head . scSelectionList . slOffset %~
|
||||
(\x -> if x + maxlines - 2 >= alllines then 0 else x + maxlines - 2)
|
||||
DummySelectionItem -> Just id
|
||||
SpecialSelectionItem -> Just id
|
||||
_ -> u
|
||||
|
||||
|
||||
Reference in New Issue
Block a user