Move selection list offset into option screen data structure
This commit is contained in:
+2
-2
@@ -103,7 +103,7 @@ mouseClickOptionsList mos sl u = case u ^. uvWorld . input . mouseButtons . at B
|
||||
ScrollSelectionItem -> do
|
||||
maxlines <- sl ^? slSizeRestriction . maxSelectionLines
|
||||
alllines <- sl ^? slLength
|
||||
Just $ uvScreenLayers . _head . scSelectionList . slOffset %~
|
||||
Just $ uvScreenLayers . _head . scOffset %~
|
||||
(\x -> if x + maxlines - 2 >= alllines then 0 else x + maxlines - 2)
|
||||
SpecialSelectionItem -> Just id
|
||||
_ -> u
|
||||
@@ -155,7 +155,7 @@ optionScreenUpdate mos mop _ sl u =
|
||||
. mouseOverSelectionList sl
|
||||
. menuWheelEvents
|
||||
. over (uvScreenLayers . _head . scSelectionList) (setSelectionListRestriction cfig)
|
||||
$ over (uvScreenLayers . _head . scSelectionList) setShownSelectionItems
|
||||
$ over (uvScreenLayers . _head) setShownSelectionItems
|
||||
u
|
||||
where
|
||||
cfig = u ^. uvConfig
|
||||
|
||||
Reference in New Issue
Block a user