add poadding to top of statusbar

This commit is contained in:
Colin McMillen 2023-07-26 11:24:56 -04:00
parent 3012f67c9f
commit a92d089c5b

View File

@ -504,6 +504,7 @@ public static class Util {
return texture;
}
// FIXME: make a real icon stored as a PNG...
public static OpenTK.Windowing.Common.Input.Image[] RenderAppIcon() {
int size = 64;
Font font = SystemFonts.CreateFont("MS Mincho", size, FontStyle.Bold);
@ -803,11 +804,12 @@ public class Game : GameWindow {
}
// Draw status box.
int statusPadding = 2;
DrawFilledBox(geometry.StatusBox, Color4.Black);
DrawText(activePhoto.Description(), geometry.StatusBox.Min.X + 80, geometry.StatusBox.Min.Y);
DrawText($" FPS: {fpsCounter.Fps}", geometry.StatusBox.Max.X - 76, geometry.StatusBox.Min.Y);
DrawText(activePhoto.Description(), geometry.StatusBox.Min.X + 80, geometry.StatusBox.Min.Y + statusPadding);
DrawText($" FPS: {fpsCounter.Fps}", geometry.StatusBox.Max.X - 76, geometry.StatusBox.Min.Y + statusPadding);
if (activePhoto.Loaded) {
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Min.X, geometry.StatusBox.Min.Y);
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Min.X, geometry.StatusBox.Min.Y + statusPadding);
}
SwapBuffers();