summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Game.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LivingVillage.Desktop/Game.fs')
-rw-r--r--src/LivingVillage.Desktop/Game.fs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index 4720008..1db5c3d 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -666,6 +666,19 @@ type LivingVillageGame() as this =
let spec = VillageArt.npcSpriteSpecAtTarget npc.Id npc.Pos npc.Mind.Target world.Tick
VillageArt.drawCharacter spriteBatch artTextures camera npc.Pos spec profile.WorldTint
spriteBatch.End()
+
+ // Contextual floating prompt over the unique target; same CJK atlas font path as the HUD.
+ if m5View.Panel = M5Panel.WorldPanel && menu.Page = Playing then
+ match m5View.Prompt, m5View.PromptTargetPos with
+ | Some text, Some targetPos ->
+ let scale = 2
+ let rect = FloatingPrompt.layout viewport.Width viewport.Height targetPos.X targetPos.Y camera.X camera.Y scale text
+ spriteBatch.Begin()
+ spriteBatch.Draw(pixel, Rectangle(rect.X - 6, rect.Y - 5, rect.Width + 12, rect.Height + 8), Color(15, 19, 25, 200))
+ spriteBatch.Draw(pixel, Rectangle(rect.X - 6, rect.Y - 5, rect.Width + 12, 2), Color(92, 180, 190))
+ PixelText.draw spriteBatch pixel cjkAtlas rect.X rect.Y scale (Color(240, 250, 240)) text
+ spriteBatch.End()
+ | _ -> ()
this.DrawM5Overlay()
member private this.DrawM5Overlay() =