Allow rewinding after combining items
This commit is contained in:
@@ -42,8 +42,6 @@ drawInGameHUD cfig w = pictures
|
||||
|
||||
inventoryDisplay :: Configuration -> World -> Picture
|
||||
inventoryDisplay cfig w = listTextPicturesAt 0 0 cfig invlist
|
||||
<> equipcursor
|
||||
<> equipcursors
|
||||
where
|
||||
cr = you w
|
||||
inv = _crInv cr
|
||||
@@ -58,12 +56,6 @@ inventoryDisplay cfig w = listTextPicturesAt 0 0 cfig invlist
|
||||
0 -> [color invDimColor . text $ " INVENTORY FULL"]
|
||||
1 -> [color invDimColor . text $ " +1 FREE SLOT"]
|
||||
x -> [color invDimColor . text $ " +" ++ show x ++ " FREE SLOTS"]
|
||||
equipcursor = case _crLeftInvSel cr of
|
||||
Nothing -> mempty
|
||||
Just invid -> f cyan invid
|
||||
equipcursors = foldMap (f yellow) (IS.toList $ _crInvEquipped cr)
|
||||
f col invid = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text "EQUIPPED"
|
||||
|
||||
|
||||
subInventoryDisplay :: Configuration -> World -> Picture
|
||||
subInventoryDisplay cfig w = case _inventoryMode w of
|
||||
@@ -71,6 +63,8 @@ subInventoryDisplay cfig w = case _inventoryMode w of
|
||||
TopInventory -> pictures
|
||||
[ selcursor
|
||||
, closeobjectcursor
|
||||
, equipcursor
|
||||
, equipcursors
|
||||
]
|
||||
TweakInventory -> pictures
|
||||
--[ mCurs it cfig w
|
||||
@@ -111,7 +105,7 @@ subInventoryDisplay cfig w = case _inventoryMode w of
|
||||
Nothing -> mempty
|
||||
Just (i,co) -> listCursorNS clObjFloatIn 0 cfig (selNumPos i w) (closeObjectCol co) topInvW (invSelSize i w)
|
||||
itcol = fromMaybe (greyN 0.5) (it ^? _Just . itInvColor)
|
||||
--cr = you w
|
||||
cr = you w
|
||||
it = yourItem w
|
||||
selcursor' ct = fromMaybe mempty $ ct 0 0 cfig curpos itcol topInvW cury <$ it
|
||||
selcursor = selcursor' selcursortype
|
||||
@@ -120,6 +114,11 @@ subInventoryDisplay cfig w = case _inventoryMode w of
|
||||
| otherwise = listCursorNSW
|
||||
curpos = invSelPos w
|
||||
cury = fromMaybe 1 $ augmentedInvSizes w IM.!? _crInvSel (you w)
|
||||
equipcursor = case _crLeftInvSel cr of
|
||||
Nothing -> mempty
|
||||
Just invid -> f cyan invid
|
||||
equipcursors = foldMap (f yellow) (IS.toList $ _crInvEquipped cr)
|
||||
f col invid = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text "EQUIPPED"
|
||||
|
||||
topInvW :: Int
|
||||
topInvW = 15
|
||||
|
||||
Reference in New Issue
Block a user