Hello, I would like to know how it is possible to make an Interface in libgdx? I knew the Channel from dermetfan and some Tutorials, but I don´t get it to 100%.
Is it possible to set a screen ontop of another Screen or do I have to use Stage for the UI?
Lets say I want to make an hp/mp bar what would I have todo to draw this? Currently I am doing it just like this
Table playerInfo = new Table();
//playerInfo.top().left();
playerInfo.defaults().space(3f);
playerInfo.pad(10f, 10f, 0, 0);
playerInfo.debug();
playerInfo.setPosition(0, Gdx.graphics.getHeight());
playerInfo.size(200f, -100f);
playerInfo.add(new Label("HP: ", skin)).size(25f, 20f);
playerInfo.add(new Label("", skin)).size(75f, 20f).row();
playerInfo.add(new Label("MP: ", skin)).size(25f, 20f);
playerInfo.add(new Label("", skin)).size(75f, 20f).row();
In order to use an normal Image like in every common Game how todo? Especially I dont get how to draw the pixel, when the bar is not full. So, would it be correct to draw the bar surronding and load it then per LabelStyle? So the Background? Or just an different Class? How then i draw the red pixels according to the health?
How do i do it that it looks like an Window? …Ah I can make an Window Class and then add to it an Table, great.
How can I make the positions better? When u look at the above example, its very annoying with the fixed sizes, is there somekind of Layout possible?
Well for Pathfinding Algorithms I need the Map data, so should i read everytime from the Tiledmap from libgdx or make an own Map Class and then fill it with an 2d Array just if the Tile is blocked or free?