Fix scroll selection of floor items and buttons
This commit is contained in:
@@ -4,6 +4,8 @@ module Dodge.Update.Input
|
||||
, doInputScreenInput
|
||||
) where
|
||||
|
||||
--import Dodge.Inventory.SelectionList
|
||||
--import Dodge.Render.HUD
|
||||
import Dodge.Terminal.LeftButton
|
||||
import Dodge.Save
|
||||
import Dodge.Debug.Terminal
|
||||
@@ -93,8 +95,8 @@ spaceAction w = case w ^?! cWorld . lWorld . hud . hudElement of
|
||||
Just (_, Left flit) -> pickUpItem 0 flit w
|
||||
Just (_, Right but) -> doButtonEvent (_btEvent but) but w
|
||||
_ -> w
|
||||
DisplayInventory DisplayTerminal{} -> w & cWorld . lWorld . hud . hudElement .~ DisplayInventory NoSubInventory
|
||||
_ -> w & cWorld . lWorld . hud . hudElement .~ DisplayInventory NoSubInventory
|
||||
DisplayInventory DisplayTerminal{} -> w & cWorld . lWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
_ -> w & cWorld . lWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
where
|
||||
--theLoc = doWorldPos (fst (_seenLocations (_cWorld w) IM.! _selLocation (_cWorld w))) w
|
||||
theLoc = doWorldPos (w ^?! cWorld . lWorld . seenLocations . ix (w ^. cWorld . lWorld . selLocation) . _1) w
|
||||
@@ -106,10 +108,10 @@ toggleMap w = case w ^?! cWorld . lWorld . hud . hudElement of
|
||||
|
||||
toggleTweakInv :: World -> World
|
||||
toggleTweakInv w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
DisplayInventory TweakInventory{} -> w & thepointer .~ DisplayInventory NoSubInventory
|
||||
_ -> w & thepointer .~ DisplayInventory (TweakInventory mi)
|
||||
DisplayInventory TweakInventory{} -> w & thepointer .~ NoSubInventory
|
||||
_ -> w & thepointer .~ TweakInventory mi
|
||||
where
|
||||
thepointer = cWorld . lWorld . hud . hudElement
|
||||
thepointer = cWorld . lWorld . hud . hudElement . subInventory
|
||||
mi = 0 <$ (yourItem w >>= (^? itTweaks . tweakParams . ix 0))
|
||||
|
||||
toggleInspectInv :: HUDElement -> HUDElement
|
||||
|
||||
Reference in New Issue
Block a user