Work on terminal text display

This commit is contained in:
2025-12-23 22:02:38 +00:00
parent 238d6b8799
commit 9e8b847940
5 changed files with 40 additions and 45 deletions
+6 -12
View File
@@ -16,8 +16,8 @@ import Dodge.Data.World
import Linear
import SDL (MouseButton (..))
defaultListDisplayParams :: ListDisplayParams
defaultListDisplayParams =
defaultLDP :: ListDisplayParams
defaultLDP =
ListDisplayParams
{ _ldpVerticalGap = 0
, _ldpScale = 1
@@ -30,7 +30,8 @@ defaultListDisplayParams =
}
invDP :: ListDisplayParams
invDP = defaultListDisplayParams & ldpPos . spPixelOff .~ V2 6 0
--invDP = defaultLDP & ldpPos . spPixelOff .~ V2 6 0
invDP = defaultLDP & ldpPos . spPixelOff .~ V2 16 (-20)
invCursorParams :: World -> CursorDisplay
invCursorParams w = BoundaryCursor $ case w ^? hud . subInventory of
@@ -40,10 +41,7 @@ invCursorParams w = BoundaryCursor $ case w ^? hud . subInventory of
_ -> [North, South, West]
secondColumnLDP :: ListDisplayParams
--secondColumnLDP = defaultListDisplayParams & ldpPos . spPixelOff .~ V2 subInvX (-20)
secondColumnLDP = defaultListDisplayParams
& ldpPos . spPixelOff .~ V2 subInvX (-16)
& ldpBorder ?~ (49, 16)
secondColumnLDP = defaultLDP & ldpPos . spPixelOff .~ V2 subInvX (-20)
subInvX :: Float
subInvX = 10 * fromIntegral topInvW + 170
@@ -52,8 +50,4 @@ topInvW :: Int
topInvW = 15
menuLDP :: ListDisplayParams
menuLDP =
defaultListDisplayParams
& ldpPos . spPixelOff .~ V2 11 (-70)
& ldpScale .~ 2
& ldpVerticalGap .~ 0
menuLDP = defaultLDP & ldpPos . spPixelOff .~ V2 11 (-70) & ldpScale .~ 2