From f79839a4bb57b977b7208e5f826a8b0989cbc33e Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 00:10:18 +0800 Subject: feat(desktop): P16 HUD 顶部窄信息条(时段/时间/倍速/体力/钱币)+ 冬夜冷色 + 面板/提示渐变重绘 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LivingVillage.Desktop/Interaction.fs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/LivingVillage.Desktop/Interaction.fs') 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 } -- cgit v1.2.3