draw status box background black

This commit is contained in:
Colin McMillen 2023-07-25 09:45:40 -04:00
parent 3a9192b478
commit a33304ae7d

View File

@ -604,6 +604,7 @@ public class Game : GameWindow {
}
// Draw status box.
DrawFilledBox(geometry.StatusBox, Color4.Black);
DrawText(activePhoto.Description(), geometry.StatusBox.Min.X + 80, geometry.StatusBox.Min.Y);
if (activePhoto.Loaded) {
DrawText($"{(scale * 100):F1}%", geometry.StatusBox.Min.X, geometry.StatusBox.Min.Y);
@ -631,6 +632,10 @@ public class Game : GameWindow {
DrawTexture(TEXTURE_WHITE, Util.MakeBox(box.Max.X - thickness, box.Min.Y, thickness, box.Size.Y), color);
}
void DrawFilledBox(Box2i box, Color4 color) {
DrawTexture(TEXTURE_WHITE, Util.MakeBox(box.Min.X, box.Min.Y, box.Size.X, box.Size.Y), color);
}
void DrawText(string text, int x, int y) {
Texture label = Util.RenderText(text);
DrawTexture(label, Util.MakeBox(x, y, label.Size.X, label.Size.Y));