Skip to content
Snippets Groups Projects
Commit 32404d1f authored by Karl Aaron Rudkowski's avatar Karl Aaron Rudkowski
Browse files

main menu centered, ship uis stuff

system und crew fehlen ganz (noch)
parent d4c82922
Branches MainMenuLogin
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ public class MainMenu implements Screen {
public MainMenu(Main main){
this.main = main;
background = new Texture("1080p.png");
newGame = new NewGameButton(main.WIDTH/2, main.HEIGHT/2, 248, 50, this);
quit = new QuitButton(main.WIDTH/2, main.HEIGHT/2 - 100, 248, 50, this);
newGame = new NewGameButton(main.WIDTH/2 - 124, main.HEIGHT/2 - 25, 248, 50, this);
quit = new QuitButton(main.WIDTH/2 - 75 , main.HEIGHT/2 - 100 - 25, 248, 50, this);
stage = new Stage();
stage.addActor(quit);
......
......@@ -101,16 +101,17 @@ public class ShipView extends AbstractShip {
super(main, ship, stage, game);
//java.util.List crew = ship.get ??
this.map = map;
rooms = new HashMap<>();
List<Room> existingRooms = ship.getSystems();
for(Room r : existingRooms) {
//TODO wie system das zu raum gehört? dann sys id als key, roomui als value
}
weaponAutofire = new AutofireButton(main.WIDTH/2, main.HEIGHT - 200, 248, 50, this); //TODO xywh
moveButton = new MoveButton(main.WIDTH/2, main.HEIGHT - 100, 248, 50, this);
inventory = new ShipButton(main.WIDTH/2 + 250,main.HEIGHT - 100, 248, 50, this);
weaponAutofire = new AutofireButton(1020, 130, 248, 50, this);
moveButton = new MoveButton(850, main.HEIGHT - 90, 300, 500, this); //TODO same here
inventory = new ShipButton(750,main.HEIGHT - 80, 450, 500, this); //TODO warum ändert sich die größe nicht
money = new ScrapUI(main, ship.getCoins());
hull = new HullUI(main, ship.getHp());
......@@ -132,16 +133,15 @@ public class ShipView extends AbstractShip {
@Override
public void render() {
stage.draw();
main.batch.begin();
main.batch.draw(shipBackground, 0, 0, 0, 0); //TODO xywh
main.batch.draw(shipRoomBackground, 0, 0, 10, 10);
main.batch.draw(weaponGeneralBackground, 0, 0, 0, 0);
main.batch.draw(shipBackground, main.WIDTH -1730, main.HEIGHT/2 - shipBackground.getHeight()/2 - 200, 1000, 1000); //TODO xywh
main.batch.draw(shipRoomBackground, main.WIDTH -1500, main.HEIGHT/2 - shipRoomBackground.getHeight()/2 - 100, 550, 550);
main.batch.draw(weaponGeneralBackground, 700, 100, 328, 90);
main.batch.end();
money.render();
hull.render();
energy.render();
if(inventoryUI != null) {
inventoryUI.render();
......
......@@ -53,10 +53,10 @@ public class EnergyUI {
public void render() {
main.batch.begin();
float x = 0; //TODO
float y = 100;
for(int i =0; i<=currentTexture; i++) {
main.batch.draw(energyTexture, x, 0, 0, 0); //TODO xywh
x+=10;
main.batch.draw(energyTexture, 25, y, 44, 13);
y+=20;
}
main.batch.end();
}
......
......@@ -63,12 +63,12 @@ public class HullUI {
*/
public void render() {
main.batch.begin();
main.batch.draw(hullBackgroundTexture, 0, 0, 0, 0); //TODO xywh
float x = 0;
float x = 25;
for(int i=0; i<=currentTexture; i++) {
main.batch.draw(hullTexture, x, 0, 10, 10);
x+=5;
main.batch.draw(hullTexture, x, main.HEIGHT - 83, 25, 25);
x+=12;
}
main.batch.draw(hullBackgroundTexture, 25, main.HEIGHT - 112, 577, 97);
main.batch.end();
}
......
......@@ -40,7 +40,7 @@ public class ScrapUI {
*/
public void render() {
main.batch.begin();
main.batch.draw(scrapBackground, 0, 0, 0, 0); //TODO xy, w, h
main.batch.draw(scrapBackground, 600, main.HEIGHT - 90, 147, 60);
main.batch.end();
}
......
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