updated all menus and fixed titlelogo.
This commit is contained in:
parent
ceb9a8d18f
commit
49d4040b96
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@ -1,6 +1,8 @@
|
||||
package com.saltosion.gladiator.gui.creators;
|
||||
|
||||
import com.saltosion.gladiator.gui.nodes.ButtonNode;
|
||||
import com.saltosion.gladiator.gui.nodes.GUINode;
|
||||
import com.saltosion.gladiator.gui.nodes.ImageNode;
|
||||
import com.saltosion.gladiator.gui.nodes.TextNode;
|
||||
import com.saltosion.gladiator.util.AppUtil;
|
||||
import com.saltosion.gladiator.util.Name;
|
||||
@ -12,13 +14,18 @@ public class GameOverGUICreator implements GUICreator {
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
TextNode titleText = new TextNode("game_title", "Gladiator Brawler Game Thing!");
|
||||
titleText.setPosition(0.23f, 0.8f);
|
||||
AppUtil.guiManager.getRootNode().addChild(titleText);
|
||||
ImageNode backgroundImg = new ImageNode("background_image",
|
||||
SpriteLoader.loadSprite(Name.MENU_BACKGROUND));
|
||||
backgroundImg.setPosition(.5f, .5f);
|
||||
AppUtil.guiManager.getRootNode().addChild(backgroundImg);
|
||||
|
||||
GUINode menuNode = new GUINode("menu-node");
|
||||
menuNode.setPosition(-.5f, -.5f);
|
||||
backgroundImg.addChild(menuNode);
|
||||
|
||||
TextNode gameOverText = new TextNode("game_over", "Game over");
|
||||
gameOverText.setPosition(0.415f, 0.6f);
|
||||
AppUtil.guiManager.getRootNode().addChild(gameOverText);
|
||||
gameOverText.setPosition(0.315f, 0.6f);
|
||||
menuNode.addChild(gameOverText);
|
||||
|
||||
ButtonNode playButton = new ButtonNode("return_button", SpriteLoader.loadSprite(Name.BUTTON_BIG),
|
||||
SpriteLoader.loadSprite(Name.BUTTON_BIG_HOVER)) {
|
||||
@ -31,11 +38,11 @@ public class GameOverGUICreator implements GUICreator {
|
||||
shouldReturn = true;
|
||||
}
|
||||
};
|
||||
playButton.setPosition(0.5f, 0.4f);
|
||||
playButton.setPosition(0.4f, 0.4f);
|
||||
TextNode playButtonText = new TextNode("return_button_text", "Main Menu");
|
||||
playButtonText.setPosition(-0.09f, 0.0175f);
|
||||
playButton.addChild(playButtonText);
|
||||
AppUtil.guiManager.getRootNode().addChild(playButton);
|
||||
menuNode.addChild(playButton);
|
||||
}
|
||||
|
||||
public boolean shouldReturn() {
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.saltosion.gladiator.gui.creators;
|
||||
|
||||
import com.saltosion.gladiator.gui.nodes.ButtonNode;
|
||||
import com.saltosion.gladiator.gui.nodes.GUINode;
|
||||
import com.saltosion.gladiator.gui.nodes.ImageNode;
|
||||
import com.saltosion.gladiator.gui.nodes.TextNode;
|
||||
import com.saltosion.gladiator.util.AppUtil;
|
||||
import com.saltosion.gladiator.util.Name;
|
||||
@ -12,13 +14,18 @@ public class WinGUICreator implements GUICreator {
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
TextNode titleText = new TextNode("game_title", "Gladiator Brawler Game Thing!");
|
||||
titleText.setPosition(0.23f, 0.8f);
|
||||
AppUtil.guiManager.getRootNode().addChild(titleText);
|
||||
ImageNode backgroundImg = new ImageNode("background_image",
|
||||
SpriteLoader.loadSprite(Name.MENU_BACKGROUND));
|
||||
backgroundImg.setPosition(.5f, .5f);
|
||||
AppUtil.guiManager.getRootNode().addChild(backgroundImg);
|
||||
|
||||
GUINode menuNode = new GUINode("menu-node");
|
||||
menuNode.setPosition(-.5f, -.5f);
|
||||
backgroundImg.addChild(menuNode);
|
||||
|
||||
TextNode gameOverText = new TextNode("win", "You win!");
|
||||
gameOverText.setPosition(0.415f, 0.6f);
|
||||
AppUtil.guiManager.getRootNode().addChild(gameOverText);
|
||||
gameOverText.setPosition(0.315f, 0.6f);
|
||||
menuNode.addChild(gameOverText);
|
||||
|
||||
ButtonNode playButton = new ButtonNode("return_button", SpriteLoader.loadSprite(Name.BUTTON_BIG),
|
||||
SpriteLoader.loadSprite(Name.BUTTON_BIG_HOVER)) {
|
||||
@ -31,11 +38,11 @@ public class WinGUICreator implements GUICreator {
|
||||
shouldReturn = true;
|
||||
}
|
||||
};
|
||||
playButton.setPosition(0.5f, 0.4f);
|
||||
playButton.setPosition(0.4f, 0.4f);
|
||||
TextNode playButtonText = new TextNode("return_button_text", "Main Menu");
|
||||
playButtonText.setPosition(-0.09f, 0.0175f);
|
||||
playButton.addChild(playButtonText);
|
||||
AppUtil.guiManager.getRootNode().addChild(playButton);
|
||||
menuNode.addChild(playButton);
|
||||
}
|
||||
|
||||
public boolean shouldReturn() {
|
||||
|
Loading…
Reference in New Issue
Block a user