Move towards separating selection sections cursor position storage

This commit is contained in:
2024-10-24 13:42:49 +01:00
parent 5ca440ca67
commit 81f4f38166
3 changed files with 51 additions and 41 deletions
+3 -1
View File
@@ -226,10 +226,12 @@ scrollAugInvSel :: Int -> World -> World
scrollAugInvSel yi w
| yi == 0 = w
| otherwise =
w & hud . hudElement . diSections %~ scrollSelectionSections yi
w & hud . hudElement . diSections %~ doscroll
& worldEventFlags . at InventoryChange ?~ ()
& setInvPosFromSS
& cWorld . lWorld %~ crUpdateItemLocations 0
where
doscroll sss = sss & sssExtra . sssSelPos %~ scrollSelectionSections yi sss
selectedCloseObject :: World -> Maybe (Either FloorItem Button)
selectedCloseObject w = do