Refactoring and linting

This commit is contained in:
2021-04-30 17:50:28 +02:00
parent 83c2220813
commit 9c0e4425da
18 changed files with 531 additions and 523 deletions
+4 -7
View File
@@ -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