From 4afa0bea97c6aeaaa7c2ee348e2546d7a034a0a2 Mon Sep 17 00:00:00 2001 From: Jakob Harder <12190313+jakobharder@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:57:52 +0100 Subject: [PATCH] avoid entry titles under daytime bar --- source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs b/source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs index 917bbfc..235f52a 100644 --- a/source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs +++ b/source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs @@ -59,10 +59,14 @@ public void RenderOverlay(RenderTarget Target, Vector2 Offset, Vector2 Size) if (!isVisible) return; + const int topMargin = 8; + + var textTarget = Target.GetSubBuffer(new Rect(0, topMargin, Target.Width, Target.Height - topMargin)); + if (mapState != null && mapState.Hover != null) { Font font = resMan.GetFont(BurntimeClassic.FontName, mapState.Hover.Color); - font.DrawText(Target, mapState.Hover.Position + Offset, mapState.Hover.Title, TextAlignment.Center); + font.DrawText(textTarget, mapState.Hover.Position + Offset - new Vector2(0, topMargin), mapState.Hover.Title, TextAlignment.Center); } }