clean up TEXTURE_WHITE initialization & thumbnail geometry
This commit is contained in:
parent
ec2989a9b0
commit
5194fec400
@ -198,10 +198,10 @@ public class UiGeometry {
|
|||||||
public UiGeometry(Vector2i windowSize) {
|
public UiGeometry(Vector2i windowSize) {
|
||||||
WindowSize = 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 thumbnailWidth = (int) 1.0 * thumbnailHeight * activeCamera.Resolution.X / activeCamera.Resolution.Y;
|
||||||
int numBoxes = 10; // FIXME
|
for (int i = 0; i < numThumbnails; i++) {
|
||||||
for (int i = 0; i < numBoxes; i++) {
|
|
||||||
Box2i box = Util.makeBox(WindowSize.X - thumbnailWidth, i * thumbnailHeight, thumbnailWidth, thumbnailHeight);
|
Box2i box = Util.makeBox(WindowSize.X - thumbnailWidth, i * thumbnailHeight, thumbnailWidth, thumbnailHeight);
|
||||||
ThumbnailBoxes.Add(box);
|
ThumbnailBoxes.Add(box);
|
||||||
}
|
}
|
||||||
@ -219,8 +219,7 @@ public static class Util {
|
|||||||
public class Game : GameWindow {
|
public class Game : GameWindow {
|
||||||
public Game(GameWindowSettings gwSettings, NativeWindowSettings nwSettings) : base(gwSettings, nwSettings) { }
|
public Game(GameWindowSettings gwSettings, NativeWindowSettings nwSettings) : base(gwSettings, nwSettings) { }
|
||||||
|
|
||||||
private static Image<Rgba32> white1x1 = new(1, 1, new Rgba32(255, 255, 255));
|
private static Texture TEXTURE_WHITE = new Texture(new Image<Rgba32>(1, 1, new Rgba32(255, 255, 255)));
|
||||||
private static Texture TEXTURE_WHITE = new Texture(white1x1);
|
|
||||||
|
|
||||||
UiGeometry geometry = new();
|
UiGeometry geometry = new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user