Work on inventory dragging
This commit is contained in:
@@ -271,9 +271,9 @@ invSetSelection sel w =
|
||||
w
|
||||
& hud . diSelection ?~ sel
|
||||
& worldEventFlags . at InventoryChange ?~ ()
|
||||
& crUpdateItemLocations
|
||||
-- & crUpdateItemLocations
|
||||
& setInvPosFromSS -- is this necessary here?
|
||||
& crUpdateItemLocations
|
||||
-- & crUpdateItemLocations
|
||||
|
||||
invSetSelectionPos :: Int -> Int -> World -> World
|
||||
invSetSelectionPos i j = invSetSelection (Sel i j)
|
||||
|
||||
@@ -309,12 +309,6 @@ startDrag (a, b) w = setcontext $ fromMaybe (invSetSelection (Sel a b) w & hud.d
|
||||
where
|
||||
setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b))
|
||||
|
||||
-- startDrag (a, b) w = setcontext $ case w ^? hud . diSelection . _Just of
|
||||
-- Just (Sel i _ xs) | i == a && b `IS.member` xs -> w
|
||||
-- _ -> invSetSelection (Sel a b mempty) w
|
||||
-- where
|
||||
-- setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b))
|
||||
|
||||
shiftInvItems ::
|
||||
Config ->
|
||||
Int -> -- recurse limit
|
||||
|
||||
Reference in New Issue
Block a user