Start implementing attachable scroll items

This commit is contained in:
2023-11-08 18:39:38 +00:00
parent 8f0dd8cd1b
commit f26d380c1b
20 changed files with 119 additions and 116 deletions
+7 -7
View File
@@ -4,7 +4,7 @@ module Dodge.Inventory (
rmSelectedInvItem,
rmInvItem,
updateCloseObjects,
closeObjScrollDir,
--closeObjScrollDir,
changeSwapSel,
scrollAugInvSel,
crNumFreeSlots,
@@ -31,7 +31,7 @@ import Geometry
import qualified IntMapHelp as IM
import LensHelp
import ListHelp
import Padding
--import Padding
-- TODO check what happens to selection index when dropping non-selected items
@@ -134,11 +134,11 @@ updateCloseObjects w =
updatebyid (Right btid) = fmap Right $ w ^? cWorld . lWorld . buttons . ix (_btID btid)
closeObjScrollDir :: Float -> World -> World
closeObjScrollDir x
| x > 0 = over (hud . closeObjects) rotU
| x < 0 = over (hud . closeObjects) rotD
| otherwise = id
--closeObjScrollDir :: Float -> World -> World
--closeObjScrollDir x
-- | x > 0 = over (hud . closeObjects) rotU
-- | x < 0 = over (hud . closeObjects) rotD
-- | otherwise = id
changeSwapSel :: Int -> World -> World
changeSwapSel yi w