Distinguish between selected item and root-selected item
This commit is contained in:
@@ -97,7 +97,7 @@ drawExamineInventory cfig mtweaki w =
|
||||
)
|
||||
)
|
||||
where
|
||||
itm = yourItem w
|
||||
itm = yourSelectedItem w
|
||||
f str =
|
||||
SelectionItem
|
||||
{ _siPictures = [str]
|
||||
@@ -122,14 +122,14 @@ floorItemPickupInfo n itm
|
||||
-- it is probably desirable for this to crash hard for now
|
||||
yourAugmentedItem :: (Item -> a) -> a -> (Either FloorItem Button -> a) -> World -> a
|
||||
yourAugmentedItem f x g w = case you w ^? crManipulation . manObject of
|
||||
Just (InInventory (SelItem i _)) -> f $ yourInv w ^?! ix i
|
||||
Just (InInventory (SelectedItem i _)) -> f $ yourInv w ^?! ix i
|
||||
Just (InNearby (SelCloseObject i)) -> g $ w ^?! hud . closeObjects . ix i
|
||||
_ -> x
|
||||
|
||||
drawRBOptions :: Configuration -> World -> Picture
|
||||
drawRBOptions cfig w = fromMaybe mempty $ do
|
||||
guard $ ButtonRight `M.member` _mouseButtons (_input w)
|
||||
invid <- you w ^? crManipulation . manObject . inInventory . ispItem
|
||||
invid <- you w ^? crManipulation . manObject . inInventory . imSelectedItem
|
||||
eslist <- fmap equipSiteToPositions $ you w ^? crInv . ix invid . itUse . equipEffect . eeSite
|
||||
i <- w ^? rbOptions . opSel
|
||||
let ae = getEquipmentAllocation w
|
||||
|
||||
Reference in New Issue
Block a user