Decouple selection section inventory position

This commit is contained in:
2024-10-24 14:55:51 +01:00
parent 81f4f38166
commit 388064895f
17 changed files with 304 additions and 261 deletions
+4 -3
View File
@@ -58,12 +58,13 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
moveCombineSel :: Int -> World -> World
moveCombineSel yi =
( hud . hudElement . subInventory . ciSections
%~ doscroll
( hud . hudElement . subInventory %~ doscroll
)
. (worldEventFlags . at CombineInventoryChange ?~ ())
where
doscroll sss = sss & sssExtra . sssSelPos %~ scrollSelectionSections yi sss
doscroll ci = fromMaybe ci $ do
sss <- ci ^? ciSections
return $ ci & ciSelection %~ scrollSelectionSections yi sss
--moveSubSel :: Int -> Int -> World -> World
--moveSubSel yi maxyi =