changed gui to new tonegodui, added new buttons

This commit is contained in:
TheCodeBoat 2014-02-26 20:46:41 +01:00
parent 2c7e7d61d8
commit e5f1ce7788
13 changed files with 35 additions and 38 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 347 B

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<style control="Button" path="Gui/Button/Button.xml" />
<cursors path="tonegod/gui/style/def/Common/Cursors/Cursors.xml" />
<audio path="tonegod/gui/style/def/Common/Audio/Audio.xml" />
<style control="Font" path="tonegod/gui/style/def/Fonts/Fonts.xml" />
<style control="Common" path="tonegod/gui/style/def/Common/Common.xml" />
<style control="Scrolling" path="Gui/Scrolling/Scrolling.xml" />
<style control="Window" path="Gui/Window/Window.xml" />
<style control="Dial" path="tonegod/gui/style/def/Dial/Dial.xml" />
<style control="Menu" path="Gui/Menu/Menu.xml" />
<style control="Label" path="tonegod/gui/style/def/Label/Label.xml" />
<style control="Slider" path="tonegod/gui/style/def/Slider/Slider.xml" />
<style control="Spinner" path="tonegod/gui/style/def/Spinner/Spinner.xml" />
<style control="TextField" path="tonegod/gui/style/def/TextField/TextField.xml" />
<style control="TabControl" path="tonegod/gui/style/def/Tabs/Tabs.xml" />
<style control="ChatBox" path="tonegod/gui/style/def/ChatBox/ChatBox.xml" />
<style control="Indicator" path="Gui/Indicator/Indicator.xml" />
<style control="ColorWheel" path="tonegod/gui/style/def/Common/Extras/ColorWheel.xml" />
<style control="Button" path="Gui/Button/Button.gui.xml" />
<cursors path="tonegod/gui/style/def/Common/Cursors/Cursors.gui.xml" />
<audio path="tonegod/gui/style/def/Common/Audio/Audio.gui.xml" />
<style control="Font" path="tonegod/gui/style/def/Fonts/Fonts.gui.xml" />
<style control="Common" path="tonegod/gui/style/def/Common/Common.gui.xml" />
<style control="Scrolling" path="Gui/Scrolling/Scrolling.gui.xml" />
<style control="Window" path="Gui/Window/Window.gui.xml" />
<style control="Dial" path="tonegod/gui/style/def/Dial/Dial.gui.xml" />
<style control="Menu" path="Gui/Menu/Menu.gui.xml" />
<style control="Label" path="tonegod/gui/style/def/Label/Label.gui.xml" />
<style control="Slider" path="tonegod/gui/style/def/Slider/Slider.gui.xml" />
<style control="Spinner" path="tonegod/gui/style/def/Spinner/Spinner.gui.xml" />
<style control="TextField" path="tonegod/gui/style/def/TextField/TextField.gui.xml" />
<style control="TabControl" path="tonegod/gui/style/def/Tabs/Tabs.gui.xml" />
<style control="ChatBox" path="tonegod/gui/style/def/ChatBox/ChatBox.gui.xml" />
<style control="Indicator" path="Gui/Indicator/Indicator.gui.xml" />
<style control="ColorWheel" path="tonegod/gui/style/def/Common/Extras/ColorWheel.gui.xml" />
</root>

View File

@ -69,7 +69,7 @@ public class ShootingStars extends SimpleApplication {
@Override
public void simpleInitApp() {
//screen = new Screen(this);
screen = new Screen(this, "Gui/style_map.xml");
screen = new Screen(this, "Gui/style_map.gui.xml");
registerTypes();
initGUI();
@ -106,8 +106,7 @@ public class ShootingStars extends SimpleApplication {
container.registerType(StateManager.class, true);
container.registerType(SQLiteConnector.class);
container.registerType(ScoreComparator.class);
container.registerType(HighscoreManager.class, true);
//container.registerType(Screen.class, true);
container.registerType(HighscoreManager.class, true);
container.registerType(ScreenHelper.class, true);
container.registerType(AudioDataManager.class, true);
container.registerType(YTDownloader.class);

View File

@ -16,8 +16,6 @@
*/
package org.wyrez.shootingstars.gui;
import com.jme3.asset.AssetManager;
import com.jme3.font.BitmapFont;
import com.jme3.input.event.MouseButtonEvent;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector2f;
@ -30,10 +28,8 @@ import org.wyrez.shootingstars.gui.listener.GameListener;
import org.wyrez.shootingstars.helper.ScreenHelper;
import tonegod.gui.controls.buttons.Button;
import tonegod.gui.controls.extras.Indicator;
import tonegod.gui.controls.lists.Dial;
import tonegod.gui.controls.text.Label;
import tonegod.gui.controls.windows.Panel;
import tonegod.gui.controls.windows.Window;
import tonegod.gui.core.Screen;
/**
@ -75,8 +71,8 @@ public class GameGUI extends Panel implements Gui{
float startPointYMenu = screenHelper.calcY(200f);
float labelFontSize = screenHelper.calcX(20f);
btnStart = new ButtonBase(screen, new Vector2f(startPointx, startPointy),
btnStart = new ButtonBase(screen, new Vector2f(startPointx, startPointy),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(40f))) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {

View File

@ -22,6 +22,7 @@ import com.jme3.math.Vector2f;
import com.jme3.math.Vector4f;
import tonegod.gui.controls.buttons.Button;
import tonegod.gui.controls.buttons.ButtonAdapter;
import tonegod.gui.core.ElementManager;
import tonegod.gui.core.Screen;
/**
@ -30,32 +31,32 @@ import tonegod.gui.core.Screen;
*/
public class ButtonBase extends ButtonAdapter {
public ButtonBase(Screen screen, Vector2f position) {
public ButtonBase(ElementManager screen, Vector2f position) {
super(screen, position);
init();
}
public ButtonBase(Screen screen, Vector2f position, Vector2f dimensions) {
public ButtonBase(ElementManager screen, Vector2f position, Vector2f dimensions) {
super(screen, position, dimensions);
init();
}
public ButtonBase(Screen screen, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg) {
public ButtonBase(ElementManager screen, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg) {
super(screen, position, dimensions, resizeBorders, defaultImg);
init();
}
public ButtonBase(Screen screen, String UID, Vector2f position) {
public ButtonBase(ElementManager screen, String UID, Vector2f position) {
super(screen, UID, position);
init();
}
public ButtonBase(Screen screen, String UID, Vector2f position, Vector2f dimensions) {
public ButtonBase(ElementManager screen, String UID, Vector2f position, Vector2f dimensions) {
super(screen, UID, position, dimensions);
init();
}
public ButtonBase(Screen screen, String UID, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg) {
public ButtonBase(ElementManager screen, String UID, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg) {
super(screen, UID, position, dimensions, resizeBorders, defaultImg);
init();
}

View File

@ -19,6 +19,7 @@ package org.wyrez.shootingstars.gui.controls;
import com.jme3.math.Vector2f;
import com.jme3.math.Vector4f;
import tonegod.gui.controls.extras.Indicator;
import tonegod.gui.core.ElementManager;
import tonegod.gui.core.Screen;
/**
@ -27,32 +28,32 @@ import tonegod.gui.core.Screen;
*/
public class IndicatorBase extends Indicator {
public IndicatorBase(Screen screen, Vector2f position, Orientation orientation) {
public IndicatorBase(ElementManager screen, Vector2f position, Orientation orientation) {
super(screen, position, orientation);
init();
}
public IndicatorBase(Screen screen, Vector2f position, Vector2f dimensions, Orientation orientation) {
public IndicatorBase(ElementManager screen, Vector2f position, Vector2f dimensions, Orientation orientation) {
super(screen, position, dimensions, orientation);
init();
}
public IndicatorBase(Screen screen, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg, Orientation orientation) {
public IndicatorBase(ElementManager screen, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg, Orientation orientation) {
super(screen, position, dimensions, resizeBorders, defaultImg, orientation);
init();
}
public IndicatorBase(Screen screen, String UID, Vector2f position, Orientation orientation) {
public IndicatorBase(ElementManager screen, String UID, Vector2f position, Orientation orientation) {
super(screen, UID, position, orientation);
init();
}
public IndicatorBase(Screen screen, String UID, Vector2f position, Vector2f dimensions, Orientation orientation) {
public IndicatorBase(ElementManager screen, String UID, Vector2f position, Vector2f dimensions, Orientation orientation) {
super(screen, UID, position, dimensions, orientation);
init();
}
public IndicatorBase(Screen screen, String UID, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg, Orientation orientation) {
public IndicatorBase(ElementManager screen, String UID, Vector2f position, Vector2f dimensions, Vector4f resizeBorders, String defaultImg, Orientation orientation) {
super(screen, UID, position, dimensions, resizeBorders, defaultImg, orientation);
init();
}