diff options
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/Game.fs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs index 219cc96..785a6aa 100644 --- a/src/LivingVillage.Desktop/Game.fs +++ b/src/LivingVillage.Desktop/Game.fs @@ -650,6 +650,7 @@ type LivingVillageGame() as this = let statusView = { m5View with StatusTick = Some hudStatusAt } let statusLine = M5Interaction.transientStatusLine hudClock statusView |> Option.toList let allLines = persistentLines @ dialogueLines @ statusLine + let cornerLines = M5Interaction.cornerStatusLines world let panelWidth = min 360 (max 1 (viewport.Width - 32)) let maxLines = max 1 ((viewport.Height - 48) / lineHeight) let lines = allLines |> List.truncate maxLines @@ -668,4 +669,16 @@ type LivingVillageGame() as this = let visible = if line.Length > maxChars then line.Substring(0, maxChars) else line let color = if index = 0 then Color(220, 235, 220) else Color(190, 205, 210) PixelText.draw spriteBatch pixel cjkAtlas innerX (panelY + 12 + index * lineHeight) textScale color visible) + + // Minimal top-right status strip: day counter + real money/energy values. + let cornerWidth = 232 + let cornerHeight = List.length cornerLines * lineHeight + 20 + let cornerX = viewport.Width - cornerWidth - 16 + let cornerY = 16 + spriteBatch.Draw(pixel, Rectangle(cornerX, cornerY, cornerWidth, cornerHeight), Color(15, 19, 25, 150)) + spriteBatch.Draw(pixel, Rectangle(cornerX, cornerY, cornerWidth, 3), Color(92, 180, 190)) + cornerLines + |> List.iteri (fun index line -> + let visible = if line.Length > maxChars then line.Substring(0, maxChars) else line + PixelText.draw spriteBatch pixel cjkAtlas (cornerX + 10) (cornerY + 10 + index * lineHeight) textScale (Color(220, 235, 220)) visible) spriteBatch.End() |
