Skip to content

Commit

Permalink
menu background texture updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kismama committed Oct 12, 2024
1 parent 09e1955 commit dc04c4e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/ui/GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ public void drawBG(float size) {
var texCoords = new Vector2(0, 0);
var texCoordsMax = new Vector2(xCount, yCount);
tb.DrawRaw(Game.textureManager.background,
new VertexColorTexture(new Vector3(left, top, 0), Color4b.Gray, new Vector2(texCoords.X, texCoords.Y)),
new VertexColorTexture(new Vector3(right, top, 0), Color4b.Gray, new Vector2(texCoordsMax.X, texCoords.Y)),
new VertexColorTexture(new Vector3(right, bottom, 0), Color4b.Gray, new Vector2(texCoordsMax.X, texCoordsMax.Y)),
new VertexColorTexture(new Vector3(left, bottom, 0), Color4b.Gray, new Vector2(texCoords.X, texCoordsMax.Y)));
new VertexColorTexture(new Vector3(left, top, 0), Color4b.White, new Vector2(texCoords.X, texCoords.Y)),
new VertexColorTexture(new Vector3(right, top, 0), Color4b.White, new Vector2(texCoordsMax.X, texCoords.Y)),
new VertexColorTexture(new Vector3(right, bottom, 0), Color4b.White, new Vector2(texCoordsMax.X, texCoordsMax.Y)),
new VertexColorTexture(new Vector3(left, bottom, 0), Color4b.White, new Vector2(texCoords.X, texCoordsMax.Y)));
}


Expand Down
8 changes: 4 additions & 4 deletions src/ui/menu/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public MainMenu() {


var sp = new Button(this, "singleplayer", true, "Singleplayer");
sp.setPosition(new Vector2I(0, -64));
sp.setPosition(new Vector2I(0, -34));
sp.centreContents();
sp.clicked += _ => {
// we are *already* on the main thread; this is just needed so it executes a frame later
Expand All @@ -21,10 +21,10 @@ public MainMenu() {
};
Console.Out.WriteLine("sp:" + sp.bounds);
var button2 = new Button(this, "multiplayer", true, "Multiplayer (soon)");
button2.setPosition(new Vector2I(0, -32));
button2.setPosition(new Vector2I(0, -8));
button2.centreContents();
var settings = new Button(this, "settings", true, "Settings");
settings.setPosition(new Vector2I(0, 0));
settings.setPosition(new Vector2I(0, 18));
settings.centreContents();
settings.clicked += _ => {
Game.instance.executeOnMainThread(() => {
Expand All @@ -33,7 +33,7 @@ public MainMenu() {
});
};
var button4 = new Button(this, "quit", true, "Quit");
button4.setPosition(new Vector2I(0, 32));
button4.setPosition(new Vector2I(0, 44));
button4.centreContents();
button4.clicked += _ => Environment.Exit(0);
addElement(title);
Expand Down
Binary file modified textures/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified textures/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc04c4e

Please sign in to comment.