Cleanup invSelectionItem
This commit is contained in:
@@ -14,25 +14,25 @@ import LensHelp
|
||||
import Picture.Base
|
||||
|
||||
invSelectionItem' :: Creature -> Int -> Item -> SelectionItem ()
|
||||
invSelectionItem' cr i it =
|
||||
SelectionItem
|
||||
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||
, _siHeight = _itInvSize it
|
||||
, _siIsSelectable = True
|
||||
, _siColor = col
|
||||
, _siOffX = 0
|
||||
, _siPayload = ()
|
||||
}
|
||||
where
|
||||
anyhotkey = maybe [] ((' ':) .hotkeyToString) (cr ^? crInvHotkeys . ix i)
|
||||
anyequippos = maybe [] (rightPad 8 ' ' . (' ':) . eqPosText) (cr ^? crInvEquipped . ix i)
|
||||
col = itemInvColor it
|
||||
pics = case _itCurseStatus it of
|
||||
UndroppableIdentified -> itemDisplay cr it
|
||||
_ -> itemDisplay cr it
|
||||
invSelectionItem' cr i it = invSelectionItem cr i it 0
|
||||
-- SelectionItem
|
||||
-- { _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||
-- , _siHeight = _itInvSize it
|
||||
-- , _siIsSelectable = True
|
||||
-- , _siColor = col
|
||||
-- , _siOffX = 0
|
||||
-- , _siPayload = ()
|
||||
-- }
|
||||
-- where
|
||||
-- anyhotkey = maybe [] ((' ':) .hotkeyToString) (cr ^? crInvHotkeys . ix i)
|
||||
-- anyequippos = maybe [] (rightPad 8 ' ' . (' ':) . eqPosText) (cr ^? crInvEquipped . ix i)
|
||||
-- col = itemInvColor it
|
||||
-- pics = case _itCurseStatus it of
|
||||
-- UndroppableIdentified -> itemDisplay cr it
|
||||
-- _ -> itemDisplay cr it
|
||||
|
||||
invSelectionItem :: Creature -> Int -> (Item,Int,a) -> SelectionItem ()
|
||||
invSelectionItem cr i (it,indent,_) =
|
||||
invSelectionItem :: Creature -> Int -> Item -> Int -> SelectionItem ()
|
||||
invSelectionItem cr i it indent =
|
||||
SelectionItem
|
||||
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||
, _siHeight = _itInvSize it
|
||||
|
||||
Reference in New Issue
Block a user