Skip to content
Snippets Groups Projects
Commit 5d7541f9 authored by Sander Østrem Fagernes's avatar Sander Østrem Fagernes
Browse files

feat: Logout button added, only visual

Issue #14
parent b5102fc7
No related branches found
No related tags found
1 merge request!1314 Main menu screen setup
Pipeline #204247 passed
frontend/assets/main-menu-logout-button.png

508 B

......@@ -26,7 +26,9 @@ public class MainMenuScreen implements Screen {
private final Texture logo;
private final Texture welcomeBox;
private final Texture logoutButton;
private final Texture background;
private final Array<MenuButton> menuButtons;
private final Vector3 touchPos;
......@@ -41,6 +43,8 @@ public class MainMenuScreen implements Screen {
this.logo = new Texture("tankwars-logo.png");
this.welcomeBox = new Texture("main-menu-welcome-box.png");
// TODO: Add logout button to the list of menu buttons somehow to enable clicking
this.logoutButton = new Texture("main-menu-logout-button.png");
// TODO: Create our own pixel art background. ZyWDE4.jpg is a dummy background image
this.background = new Texture("ZyWDE4.jpg");
......@@ -89,6 +93,11 @@ public class MainMenuScreen implements Screen {
for (MenuButton menuButton : menuButtons) {
menuButton.draw();
}
// TODO: Find better way to scale logout button
float logoutButtonWidth = logoutButton.getWidth() * 1.2f;
batch.draw(logoutButton, -logoutButtonWidth / 2f, -viewport.getWorldHeight() / 2 + logoutButton.getHeight() / 2f,
logoutButtonWidth, logoutButton.getHeight() * 1.2f);
batch.end();
}
private void checkInput() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment