Added a queue size to the game hud and fixed the hud input thingy
This commit is contained in:
parent
bbf31af002
commit
5bb373573d
5 changed files with 125 additions and 46 deletions
|
|
@ -69,10 +69,8 @@ public class ProgressBar{
|
|||
value.setSize(new Vector2f(((float)v/max)*width,height));//(v/max)*width
|
||||
value.setLocation(new Vector2f(-width/2+(((float)v/max)*width)/2,0));
|
||||
|
||||
System.out.println("lol"+((float)v/max));
|
||||
for(int i=0; i<valueColor.length ;i++){
|
||||
if(valueColor[i] != null && ((float)v/max) < (float)i/100){
|
||||
System.out.println("lol"+((float)v/max));
|
||||
value.getTexture().setColor(valueColor[i]);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ package ei.engine.ui;
|
|||
|
||||
import ei.engine.math.Vector2f;
|
||||
import ei.engine.math.Vector3f;
|
||||
import ei.engine.scene.Entity;
|
||||
import ei.engine.scene.Node;
|
||||
import ei.engine.scene.Sprite;
|
||||
|
||||
public class Button extends UiComponent{
|
||||
private Sprite normalButton;
|
||||
private Sprite ontopButton;
|
||||
private Sprite presedButton;
|
||||
private Entity normalButton;
|
||||
private Entity ontopButton;
|
||||
private Entity presedButton;
|
||||
private Node buttonNode;
|
||||
private Vector2f size;
|
||||
|
||||
|
|
@ -18,15 +18,15 @@ public class Button extends UiComponent{
|
|||
size = s;
|
||||
}
|
||||
|
||||
public void setButtonSprite(Sprite s){
|
||||
public void setButtonSprite(Entity s){
|
||||
normalButton = s;
|
||||
}
|
||||
|
||||
public void setOnTopButtonSprite(Sprite s){
|
||||
public void setOnTopButtonSprite(Entity s){
|
||||
ontopButton = s;
|
||||
}
|
||||
|
||||
public void setPressedButtonSprite(Sprite s){
|
||||
public void setPressedButtonSprite(Entity s){
|
||||
presedButton = s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue