summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/Interaction.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-22 00:35:03 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-22 00:35:03 +0800
commit1cef3b1544ff8574c7b56bc1a84e3be0846a9b22 (patch)
tree5aa705bf3e9cfe82e5e3637cdc699bc52f93c559 /src/LivingVillage.Desktop/Interaction.fs
parent1f1c502ba750c4c55ac2aca28eacafcd0c3ae932 (diff)
parent81a84f9f86d59387a349caa339148c7a7a6d1e72 (diff)
downloadliving-village-1cef3b1544ff8574c7b56bc1a84e3be0846a9b22.tar.gz
merge: P16 启动画面/开始界面/HUD 精美化(独立复验全绿 Desktop 106/Kernel 89)
Diffstat (limited to 'src/LivingVillage.Desktop/Interaction.fs')
-rw-r--r--src/LivingVillage.Desktop/Interaction.fs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/LivingVillage.Desktop/Interaction.fs b/src/LivingVillage.Desktop/Interaction.fs
index b29cf6b..dd372ef 100644
--- a/src/LivingVillage.Desktop/Interaction.fs
+++ b/src/LivingVillage.Desktop/Interaction.fs
@@ -161,11 +161,10 @@ module FloatingPrompt =
Width: int
Height: int }
- // HUD exclusion geometry shared with the Game.fs renderer: bottom-left lightweight
- // panel band and top-right corner status strip.
+ // HUD exclusion geometry shared with the Game.fs renderer: full-width top status bar
+ // and the bottom-left lightweight panel band.
+ let hudTopBarHeight = 39
let hudBottomBandHeight = 160
- let hudTopRightWidth = 248
- let hudTopRightHeight = 72
/// Width of text as PixelText.draw advances it (scale applied, CJK 8px, latin 6px, space 4px).
let measureWidth (text: string) (scale: int) : int =
@@ -194,7 +193,7 @@ module FloatingPrompt =
let x =
if width + margin * 2 > viewportWidth then margin
else max margin (min (viewportWidth - margin - width) screenX)
- let topSafe = if x + width >= viewportWidth - hudTopRightWidth then hudTopRightHeight + margin else margin
+ let topSafe = hudTopBarHeight + margin
let bottomSafe = viewportHeight - hudBottomBandHeight - height - margin
let y = max topSafe (min bottomSafe screenY)
{ X = x; Y = y; Width = width; Height = height }