From 0d47e9a3990938484a5c8d1c6cd1817e42cae4c4 Mon Sep 17 00:00:00 2001 From: TheCodeBoat Date: Sun, 2 Feb 2014 22:03:52 +0100 Subject: [PATCH] fixed backgroundimage --- .../src/org/wyrez/shootingstars/gui/BackgroundedGui.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ShootingStars/src/org/wyrez/shootingstars/gui/BackgroundedGui.java b/ShootingStars/src/org/wyrez/shootingstars/gui/BackgroundedGui.java index e3e70ad..0e674b8 100644 --- a/ShootingStars/src/org/wyrez/shootingstars/gui/BackgroundedGui.java +++ b/ShootingStars/src/org/wyrez/shootingstars/gui/BackgroundedGui.java @@ -19,7 +19,9 @@ package org.wyrez.shootingstars.gui; import com.jme3.asset.AssetManager; import com.jme3.math.Vector2f; import com.jme3.ui.Picture; +import tonegod.gui.controls.text.Label; import tonegod.gui.controls.windows.Panel; +import tonegod.gui.core.Element; import tonegod.gui.core.Screen; /** @@ -41,13 +43,14 @@ public abstract class BackgroundedGui extends Panel implements Gui { addBackground(texture); } - private void addBackground(String texture) { + private void addBackground(String texture) { Picture bgImage = new Picture("Background"); bgImage.setPosition(0f, 0f); bgImage.setImage(assetManager, texture, false); bgImage.setWidth(screen.getWidth()); bgImage.setHeight(screen.getHeight()); - + this.setWidth(screen.getWidth()); + this.setHeight(screen.getHeight()); this.attachChild(bgImage); } }