Cleanup
This commit is contained in:
+21
-23
@@ -39,12 +39,12 @@ hudDrawings cfig w = case _hudElement $ _hud w of
|
||||
drawInGameHUD :: Configuration -> World -> Picture
|
||||
drawInGameHUD cfig w = pictures
|
||||
[ winScale cfig . dShadCol white $ displayHP 0 cfig w
|
||||
, listTextPicturesAt (halfWidth cfig) 0 cfig $ map text (_testString w w)
|
||||
, listPicturesAt (halfWidth cfig) 0 cfig $ map text (_testString w w)
|
||||
, inventoryDisplay cfig w
|
||||
]
|
||||
|
||||
inventoryDisplay :: Configuration -> World -> Picture
|
||||
inventoryDisplay cfig w = listTextPicturesAt 0 0 cfig invlist
|
||||
inventoryDisplay cfig w = listPicturesAt 0 0 cfig invlist
|
||||
where
|
||||
cr = you w
|
||||
inv = _crInv cr
|
||||
@@ -84,36 +84,34 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
return $ lnkMidInvSel cfig w curpos tweaki
|
||||
<> listCursorNSW subInvX 60 cfig tweaki white (length $ tweakstring ++ tweakname) 1
|
||||
, invHead cfig "TWEAK"
|
||||
, listTextPicturesAt subInvX 60 cfig $ map text (ammoTweakStrings it)
|
||||
, listPicturesAt subInvX 60 cfig $ map text (ammoTweakStrings it)
|
||||
]
|
||||
DisplayTerminal tid -> displayTerminal tid cfig w
|
||||
CombineInventory mi -> pictures
|
||||
[ invHead cfig "COMBINE"
|
||||
, listTextPicturesAt subInvX 60 cfig $ combineListStringPictures w
|
||||
, listPicturesAt subInvX 60 cfig $ combineListStringPictures w
|
||||
, fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
strs <- fmap (fst . snd) (combineItemListStringInfo w !? i)
|
||||
return $ listTextPicturesAtOffset (subInvX + 150) 60 cfig cpos $ map (color red . text) strs
|
||||
, fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
csize <- combineSizes w !? i
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
col <- (combineItemListYou w !? i) <&> _itInvColor . snd
|
||||
return $ listCursorNSW subInvX 60 cfig cpos col 15 csize
|
||||
, fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
col <- (combineItemListYou w !? i) <&> _itInvColor . snd
|
||||
lnks <- map fst (combineItemListYou w) !? i
|
||||
return $ lnkMidPosInvSelsCol cfig w cpos col lnks
|
||||
<> foldMap (topCursorTypeWidth listCursorNESW (topInvW +2) cfig w) lnks
|
||||
<> combineCounts cfig w lnks
|
||||
return $ pictures
|
||||
[ fromMaybe mempty $ do
|
||||
strs <- fmap (fst . snd) (combineListInfo w !? i)
|
||||
return $ listPicturesAtOff (subInvX + 150) 60 cfig cpos $ map (color red . text) strs
|
||||
, fromMaybe mempty $ do
|
||||
csize <- combineSizes w !? i
|
||||
return $ listCursorNSW subInvX 60 cfig cpos col 15 csize
|
||||
, fromMaybe mempty $ do
|
||||
lnks <- map fst (combineItemListYou w) !? i
|
||||
return $ lnkMidPosInvSelsCol cfig w cpos col lnks
|
||||
<> foldMap (topCursorTypeWidth listCursorNESW (topInvW +2) cfig w) lnks
|
||||
<> combineCounts cfig w lnks
|
||||
]
|
||||
]
|
||||
InspectInventory -> mconcat
|
||||
[ selcursor' listCursorNESW
|
||||
, invHead cfig "INSPECT"
|
||||
, listTextPicturesAt subInvX 60 cfig $ map text (itmInfo it)
|
||||
, listPicturesAt subInvX 60 cfig $ map text (itmInfo it)
|
||||
]
|
||||
where
|
||||
closeobjectcursor = case selectedCloseObject w of
|
||||
@@ -165,7 +163,7 @@ displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
|
||||
drawRBOptions :: Configuration -> World -> RightButtonOptions -> Picture
|
||||
drawRBOptions cfig w EquipOptions{_opEquip = es,_opSel=i, _opAllocateEquipment=ae} =
|
||||
listTextPicturesAtOffset 342 0 cfig (curpos-i) (map (text . eqPosText) es)
|
||||
listPicturesAtOff 342 0 cfig (curpos-i) (map (text . eqPosText) es)
|
||||
<> case ae of
|
||||
DoNotMoveEquipment -> mempty
|
||||
PutOnEquipment {}
|
||||
|
||||
Reference in New Issue
Block a user