Make inventory cursor change when dropping items sensible
This commit is contained in:
@@ -13,6 +13,7 @@ module Dodge.Inventory (
|
||||
setInvPosFromSS,
|
||||
module Dodge.Inventory.RBList,
|
||||
swapInvItems,
|
||||
scrollAugNextInSection,
|
||||
) where
|
||||
|
||||
import Control.Applicative
|
||||
@@ -236,6 +237,17 @@ scrollAugInvSel yi w
|
||||
sss <- he ^? diSections
|
||||
return $ he & diSelection %~ scrollSelectionSections yi sss
|
||||
|
||||
scrollAugNextInSection :: World -> World
|
||||
scrollAugNextInSection w =
|
||||
w & hud . hudElement %~ doscroll
|
||||
& worldEventFlags . at InventoryChange ?~ ()
|
||||
& setInvPosFromSS
|
||||
& cWorld . lWorld %~ crUpdateItemLocations 0
|
||||
where
|
||||
doscroll he = fromMaybe he $ do
|
||||
sss <- he ^? diSections
|
||||
return $ he & diSelection %~ nextInSectionSS sss
|
||||
|
||||
selectedCloseObject :: World -> Maybe (Either FloorItem Button)
|
||||
selectedCloseObject w = do
|
||||
i <-
|
||||
|
||||
Reference in New Issue
Block a user