diff --git a/src/Dodge/Render/HUD.hs b/src/Dodge/Render/HUD.hs index 0e477f6bc..263457e93 100644 --- a/src/Dodge/Render/HUD.hs +++ b/src/Dodge/Render/HUD.hs @@ -69,7 +69,7 @@ defaultSubInvSelectionList = invDisplayParams :: World -> ListDisplayParams invDisplayParams w = defaultListDisplayParams - & ldpWidth .~ FixedSelectionWidth topInvW +-- & ldpWidth .~ FixedSelectionWidth topInvW & ldpCursorType .~ BorderCursor selcursortype & ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w) where @@ -294,7 +294,8 @@ determineInvSelCursorWidth :: World -> Int determineInvSelCursorWidth w = case _rbOptions w of NoRightButtonOptions -> topInvW EquipOptions{} - | ButtonRight `M.member` _mouseButtons (_input w) -> 47 + | ButtonRight `M.member` _mouseButtons (_input w) + && w ^? hud . hudElement . subInventory == Just NoSubInventory -> 47 | otherwise -> topInvW combineListSelection :: World -> Maybe Int -> SelectionList () diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 3d25aee13..0d9951720 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -198,11 +198,11 @@ functionalUpdate' u = case u ^. uvWorld . cWorld . timeFlow of ScrollTimeFlow smoothing _ _ _ -> over uvWorld (doTimeScroll smoothing) u RewindLeftClick 0 _ -> u & uvWorld . cWorld . timeFlow .~ NormalTimeFlow RewindLeftClick _ _ -> over uvWorld scrollTimeBack u -- & uvWorld . cWorld . timeFlow .~ NormalTimeFlow - DeathTime {} -> u + DeathTime{} -> u PausedTimeFlow _ itmloc -> over uvWorld (pauseTime itmloc) u pauseTime :: Int -> World -> World -pauseTime itmloc w +pauseTime itmloc w | justPressedButtonLeft || outofcharge = w & cWorld . timeFlow .~ NormalTimeFlow | otherwise = w & pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix itmloc) . itUse . leftConsumption . wpCharge -~ 1 where @@ -225,7 +225,6 @@ doTimeScroll' smoothing w = case w ^. input . scrollAmount of _ | smoothing < 0 -> scrollTimeForward w & cWorld . timeFlow . scrollSmoothing +~ 1 _ -> w - scrollTimeBack :: World -> World scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of Nothing -> w @@ -236,10 +235,11 @@ scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of & cWorld . timeFlow . futureWorlds .:~ (w ^. cWorld . lWorld) & cWorld . timeFlow . reverseAmount -~ 1 & cWorld . lWorld .~ lw - & pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftConsumption . wpCharge .~ (x -1) - & pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftHammer .~ HammerDown + & pointituse . leftConsumption . wpCharge .~ (x -1) + & pointituse . leftHammer .~ HammerDown _ -> w where + pointituse = pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse i = w ^?! cWorld . timeFlow . scrollItemLocation scrollTimeForward :: World -> World @@ -350,6 +350,7 @@ advanceScrollAmount u = updatePastWorlds :: CWorld -> CWorld updatePastWorlds w = w & pastWorlds %~ (forceFoldable . take 100 . ((w ^. lWorld) :)) + --updatePastWorlds w = w & pastWorlds .~ [] moveHammersUp :: Universe -> Universe