Remove SelectionSections
This commit is contained in:
+7
-3
@@ -301,7 +301,11 @@ updateMouseInventorySelection cfig w = fromMaybe w $ do
|
||||
sss <- w ^? hud . hudElement . diSections
|
||||
return $ updateMouseInventorySelection' sss cfig w
|
||||
|
||||
updateMouseInventorySelection' :: SelectionSections a -> Configuration -> World -> World
|
||||
updateMouseInventorySelection' ::
|
||||
IM.IntMap (SelectionSection a) ->
|
||||
Configuration ->
|
||||
World ->
|
||||
World
|
||||
updateMouseInventorySelection' sss cfig w
|
||||
| leftclickstart = case msel of
|
||||
Nothing -> fromMaybe w $ do
|
||||
@@ -350,7 +354,7 @@ shiftInvItems ::
|
||||
Configuration ->
|
||||
Point2 ->
|
||||
ListDisplayParams ->
|
||||
SelectionSections a ->
|
||||
IM.IntMap (SelectionSection a) ->
|
||||
World ->
|
||||
World
|
||||
shiftInvItems topsel x cfig mpos ldp sss w = case inverseSelBoundaryUp cfig ldp sss mpos of
|
||||
@@ -368,7 +372,7 @@ shiftInvItemsUp (_, i) x w = foldl' f w [i .. i + x]
|
||||
shiftInvItemsDown :: (Int, Int) -> Int -> World -> World
|
||||
shiftInvItemsDown (_, i) x w = fromMaybe w $ do
|
||||
guard . isJust $
|
||||
w ^? hud . hudElement . diSections . sssSections . ix 0 . ssItems . ix (i + x + 1)
|
||||
w ^? hud . hudElement . diSections . ix 0 . ssItems . ix (i + x + 1)
|
||||
return $ foldl' f w $ reverse [i .. i + x]
|
||||
where
|
||||
f w' i' = swapInvItems g i' w'
|
||||
|
||||
Reference in New Issue
Block a user