This commit is contained in:
2024-11-25 11:23:01 +00:00
parent cd3efa9124
commit 348da9e6b6
2 changed files with 2 additions and 11 deletions
+1 -5
View File
@@ -1,5 +1 @@
/home/justin/Haskell/loop/src/Dodge/Update/Input/InGame.hs:252:13-17: warning: [-Wunused-matches]
Defined but not used: above
|
252 | above <- ss ^? ix (mini - 1)
| ^^^^^
All good (593 modules, at 11:22:57)
+1 -6
View File
@@ -100,8 +100,6 @@ updateMouseHeldInGame cfig w = case w ^. input . mouseContext of
return $ if concurrentIS is
then shiftInvItems k x ab bn is ss w
else collectInvItems is w
-- let mpos = w ^. input . mousePos
-- return $ w & dragInvItems k xs cfig mpos ldp sss
_ -> w
where
ldp = invDisplayParams w
@@ -249,13 +247,10 @@ shiftInvItems k x ab bn xs ss w = fromMaybe w $ do
(mini,_) <- IS.minView xs
if x < (k,mini)
then do
above <- ss ^? ix (mini - 1)
_ <- ss ^? ix (mini - 1)
guard $ Just (k,mini-1) /= ab
return $ shiftInvItemsUp k xs w
else do
--guard $ x > (k,maxi)
--maxss <- IM.lookupMax ss
--guard (maxi < fst maxss)
_ <- ss ^? ix (maxi + 1)
guard $ Just (k,maxi+1) < bn
return $ shiftInvItemsDown k xs w