diff options
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 } |
