You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
package Main;
|
|
|
|
import org.newdawn.slick.Color;
|
|
import org.newdawn.slick.GameContainer;
|
|
import org.newdawn.slick.Graphics;
|
|
import org.newdawn.slick.Image;
|
|
import org.newdawn.slick.SlickException;
|
|
|
|
public class UserInterface {
|
|
|
|
Image destructionBar;
|
|
Image emptyBar;
|
|
Image shieldBar;
|
|
int dbar_width, sbar_width;
|
|
private State state;
|
|
|
|
public void init(GameContainer gc, State gameState) throws SlickException {
|
|
// TODO Auto-generated method stub
|
|
this.state = gameState;
|
|
destructionBar = new Image("Main/destruction_bar.png");
|
|
shieldBar = new Image("Main/shield_bar.png");
|
|
emptyBar = new Image("Main/empty_bar.png");
|
|
dbar_width = 100;
|
|
sbar_width = 0;
|
|
|
|
|
|
}
|
|
|
|
public void render(GameContainer gc, Graphics g){
|
|
switch(state.currentState){
|
|
case "titel":break;
|
|
case "start": case "paused":
|
|
g.scale(2, 2);
|
|
emptyBar.draw(290, 25, 100, 12);
|
|
emptyBar.draw(290, 286, 100, 12);
|
|
shieldBar.draw(290, 25, sbar_width, 12);
|
|
destructionBar.draw(290, 286, dbar_width, 12);
|
|
|
|
|
|
g.scale(0.5f, 0.5f);
|
|
g.setColor(Color.blue);
|
|
g.drawString("Eject Progress", 625, 27);
|
|
|
|
g.setColor(Color.magenta);
|
|
g.drawString("System Stability", 600 ,555 );
|
|
|
|
/*
|
|
* Item Slots
|
|
g.setColor(Color.darkGray);
|
|
g.fillRect(480, 570, 30, 30, 15);
|
|
g.fillRect(520, 570, 30, 30, 15);
|
|
*/
|
|
|
|
|
|
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|