added art, changed loadingscreen background

This commit is contained in:
Raybz@Raybz 2013-07-05 10:56:06 +02:00
parent d0540a3192
commit 87732649ef
5 changed files with 14 additions and 8 deletions

BIN
Art/ShootingStars.xcf Normal file

Binary file not shown.

BIN
Art/Waben.xcf Normal file

Binary file not shown.

BIN
Art/ss_field.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -31,16 +31,21 @@ public abstract class BackgroundedGui extends Panel implements Gui {
protected final AssetManager assetManager;
public BackgroundedGui(Screen screen, Vector2f position, Vector2f dimension, AssetManager assetManager) {
super(screen, position, dimension);
this.assetManager = assetManager;
addBackground();
this(screen, position, dimension, assetManager, "Textures/bg.png");
}
private void addBackground() {
public BackgroundedGui(Screen screen, Vector2f position, Vector2f dimension,
AssetManager assetManager, String texture) {
super(screen, position, dimension);
this.assetManager = assetManager;
addBackground(texture);
}
private void addBackground(String texture) {
Picture bgImage = new Picture("Background");
bgImage.setWidth(screen.getWidth());
bgImage.setHeight(screen.getHeight());
bgImage.setImage(assetManager, "Textures/bg.png", false);
bgImage.setImage(assetManager, texture, false);
Panel bg = new Panel(screen, new Vector2f(0f, 0f));
bg.centerToParent();
bg.attachChild(bgImage);

View File

@ -31,14 +31,15 @@ import tonegod.gui.core.Screen;
*
* @author Darth Affe
*/
public class LoadingGui extends BackgroundedGui implements Gui{
public class LoadingGui extends BackgroundedGui implements Gui {
private Label lblStatus;
private Indicator indProgress;
private ScreenHelper screenHelper;
public LoadingGui(Screen screen, ScreenHelper screenHelper, AssetManager assetManager) {
super(screen, new Vector2f(0f, 0f), new Vector2f(1280f, 720f), assetManager); //create for full hd
super(screen, new Vector2f(0f, 0f), new Vector2f(1280f, 720f),
assetManager, "Textures/ShootingStars.png"); //create for full hd
this.screenHelper = screenHelper;
this.setIgnoreMouse(true);
this.setIsVisible(false);
@ -46,7 +47,7 @@ public class LoadingGui extends BackgroundedGui implements Gui{
}
private void create() {
float startPointx = screenHelper.calcX(537f);
float startPointy = screenHelper.calcY(576f);
float distancePogressbarLabely = screenHelper.calcY(36f);