Refactoring and linting
This commit is contained in:
@@ -20,9 +20,10 @@ hudDrawings w = setLayer 1 . setDepth (-0.5) . pictures $
|
||||
]
|
||||
++ selectionText
|
||||
where
|
||||
selectionText = if _carteDisplay w
|
||||
then drawLocations w
|
||||
else drawInventory w
|
||||
selectionText =
|
||||
if _carteDisplay w
|
||||
then drawLocations w
|
||||
else drawInventory w
|
||||
scaler = scale (2 / getWindowX w) (2 / getWindowY w)
|
||||
|
||||
drawInventory :: World -> [Picture]
|
||||
@@ -53,10 +54,6 @@ itemStringCol :: Item -> (String,Color)
|
||||
itemStringCol NoItem = ("----", greyN 0.5)
|
||||
itemStringCol itm = (_itInvDisplay itm itm, _itInvColor itm)
|
||||
|
||||
dItem' NoItem = scale 0.1 0.1 $ dShadCol (greyN 0.5) $ text "----"
|
||||
dItem' i = scale 0.1 0.1 $ dShadCol (_itInvColor i) t
|
||||
where t = text $ _itInvDisplay i i
|
||||
|
||||
drawLocations :: World -> [Picture]
|
||||
drawLocations w = displayListTopLeft locs w
|
||||
++ zipWith bFunc (displayListEndCoords w locTexts) locPoss
|
||||
|
||||
Reference in New Issue
Block a user