diff --git a/Program.cs b/Program.cs index 6f8113d..862f94b 100644 --- a/Program.cs +++ b/Program.cs @@ -198,10 +198,10 @@ public class UiGeometry { public UiGeometry(Vector2i windowSize) { WindowSize = windowSize; - int thumbnailHeight = 150; + int numThumbnails = 12; + int thumbnailHeight = WindowSize.Y / numThumbnails; int thumbnailWidth = (int) 1.0 * thumbnailHeight * activeCamera.Resolution.X / activeCamera.Resolution.Y; - int numBoxes = 10; // FIXME - for (int i = 0; i < numBoxes; i++) { + for (int i = 0; i < numThumbnails; i++) { Box2i box = Util.makeBox(WindowSize.X - thumbnailWidth, i * thumbnailHeight, thumbnailWidth, thumbnailHeight); ThumbnailBoxes.Add(box); } @@ -219,8 +219,7 @@ public static class Util { public class Game : GameWindow { public Game(GameWindowSettings gwSettings, NativeWindowSettings nwSettings) : base(gwSettings, nwSettings) { } - private static Image white1x1 = new(1, 1, new Rgba32(255, 255, 255)); - private static Texture TEXTURE_WHITE = new Texture(white1x1); + private static Texture TEXTURE_WHITE = new Texture(new Image(1, 1, new Rgba32(255, 255, 255))); UiGeometry geometry = new();