Skip to content

Commit

Permalink
avoid entry titles under daytime bar
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobharder committed Dec 3, 2024
1 parent 660de27 commit 4afa0be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/Burntime.Remaster/Maps/MapViewOverlayHoverText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 4afa0be

Please sign in to comment.