Commit before extending selection sections: overlapping elements
This commit is contained in:
@@ -15,21 +15,22 @@ import Picture.Base
|
||||
invSelectionItem :: Creature -> Int -> Item -> SelectionItem ()
|
||||
invSelectionItem cr i it =
|
||||
SelectionItem
|
||||
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||
, _siHeight = length pics
|
||||
{ _siPictures = (pics & ix 0 %~ (++ anyequippos ++ anyhotkey))
|
||||
, _siHeight = itSlotsTaken it
|
||||
, _siIsSelectable = True
|
||||
, _siColor = col
|
||||
, _siOffX = 0
|
||||
, _siOffY = 0
|
||||
, _siPayload = ()
|
||||
}
|
||||
where
|
||||
anyhotkey = maybe [] ((' ':) .hotkeyToString) (cr ^? crInvHotkeys . ix i)
|
||||
anyequippos = maybe [] (rightPad 8 ' ' . (' ':) . eqPosText) (cr ^? crInvEquipped . ix i)
|
||||
col = _itInvColor it
|
||||
pics = take (itSlotsTaken it) . (++ replicate 10 "*") $ case _itCurseStatus it of
|
||||
UndroppableIdentified -> itemDisplay it
|
||||
_ | cr ^? crManipulation . manObject . inInventory . ispItem == Just i -> selectedItemDisplay cr it
|
||||
_ -> itemDisplay it
|
||||
pics = case _itCurseStatus it of
|
||||
UndroppableIdentified -> itemDisplay cr it
|
||||
-- _ | cr ^? crManipulation . manObject . inInventory . ispItem == Just i -> selectedItemDisplay cr it
|
||||
_ -> itemDisplay cr it
|
||||
|
||||
hotkeyToString :: Hotkey -> String
|
||||
hotkeyToString x = case x of
|
||||
@@ -55,6 +56,7 @@ closeObjectToSelectionItem e =
|
||||
, --, _siWidth = 15
|
||||
_siColor = col
|
||||
, _siOffX = 2
|
||||
, _siOffY = 0
|
||||
, _siPayload = ()
|
||||
}
|
||||
where
|
||||
@@ -63,5 +65,5 @@ closeObjectToSelectionItem e =
|
||||
--
|
||||
closeObjectToTextPictures :: Either FloorItem Button -> ([String], Color)
|
||||
closeObjectToTextPictures e = case e of
|
||||
Left flit -> let it = _flIt flit in (itemDisplay it, _itInvColor it)
|
||||
Left flit -> let it = _flIt flit in (basicItemDisplay it, _itInvColor it)
|
||||
Right bt -> ([_btText bt], yellow)
|
||||
|
||||
Reference in New Issue
Block a user