Work on inventory ui

This commit is contained in:
2023-05-14 22:22:21 +01:00
parent 3499384d38
commit 1cec50c5ab
9 changed files with 150 additions and 165 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ module Dodge.Render.InfoBox
, renderInfoListsAt
) where
import Dodge.Data.CardinalPoint -- this should be imported implicitly
import Dodge.Base
import Dodge.Data.Camera
import Dodge.Data.Config
@@ -15,7 +16,7 @@ renderInfoListAt :: Float -> Float -> Configuration -> Camera -> (Point2, [Strin
renderInfoListAt x y cfig cam (p, ss) =
toTopLeft cfig (renderListAt x y (zip ss (repeat white)))
<> color white (lConnect (V2 (x - hw) (hh -25 - y)) (worldPosToScreen cam p))
<> toTopLeft cfig (translate x (-y) $ listCursorNSW 0 0 white 19 (length ss))
<> toTopLeft cfig (translate x (-y) $ listCursorChooseBorderScale 0 1 [North,South] 0 0 white 19 (length ss))
where
hw = halfWidth cfig
hh = halfHeight cfig