diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-22 00:10:18 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-22 00:10:18 +0800 |
| commit | f79839a4bb57b977b7208e5f826a8b0989cbc33e (patch) | |
| tree | cf0c105b114102bfbb73b3c8d400e83614b861be /src/LivingVillage.Desktop/Interaction.fs | |
| parent | d85cce460fd7fbb8854fb11ba547be1baf576de7 (diff) | |
| download | living-village-f79839a4bb57b977b7208e5f826a8b0989cbc33e.tar.gz | |
feat(desktop): P16 HUD 顶部窄信息条(时段/时间/倍速/体力/钱币)+ 冬夜冷色 + 面板/提示渐变重绘
Diffstat (limited to 'src/LivingVillage.Desktop/Interaction.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/Interaction.fs | 9 |
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 } |
