|
@@ -41,16 +41,17 @@ nifty_loading.xml
|
|
|
<controlDefinition name = "loadingbar" controller = "jme3test.TestLoadingScreen">
|
|
|
<image filename="Interface/border.png" childLayout="absolute"
|
|
|
imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15">
|
|
|
- <image id="progressbar" x="0" y="0" filename="Interface/inner.png" width="32px" height="100%"
|
|
|
- imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15" />
|
|
|
+ <image id="progressbar" x="0" y="0" filename="Interface/inner.png" width="32px"
|
|
|
+ height="100%" imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15" />
|
|
|
</image>
|
|
|
</controlDefinition>
|
|
|
|
|
|
<screen id="start" controller = "jme3test.TestLoadingScreen">
|
|
|
<layer id="layer" childLayout="center">
|
|
|
- <panel id = "panel2" height="30%" width="50%" align="center" valign="center" childLayout="vertical"
|
|
|
- visibleToMouse="true">
|
|
|
- <control id="startGame" name="button" backgroundColor="#0000" label="Load Game" align="center">
|
|
|
+ <panel id = "panel2" height="30%" width="50%" align="center" valign="center"
|
|
|
+ childLayout="vertical" visibleToMouse="true">
|
|
|
+ <control id="startGame" name="button" backgroundColor="#0000" label="Load Game"
|
|
|
+ align="center">
|
|
|
<interact onClick="showLoadingMenu()" />
|
|
|
</control>
|
|
|
</panel>
|
|
@@ -59,8 +60,10 @@ nifty_loading.xml
|
|
|
|
|
|
<screen id="loadlevel" controller = "jme3test.TestLoadingScreen">
|
|
|
<layer id="loadinglayer" childLayout="center" backgroundColor="#000000">
|
|
|
- <panel id = "loadingpanel" childLayout="vertical" align="center" valign="center" height="32px" width="70%">
|
|
|
- <control name="loadingbar" align="center" valign="center" width="100%" height="100%" />
|
|
|
+ <panel id = "loadingpanel" childLayout="vertical" align="center" valign="center"
|
|
|
+ height="32px" width="70%">
|
|
|
+ <control name="loadingbar" align="center" valign="center" width="100%"
|
|
|
+ height="100%" />
|
|
|
<control id="loadingtext" name="label" align="center"
|
|
|
text=" "/>
|
|
|
</panel>
|
|
@@ -83,13 +86,13 @@ A custom control is created, which represents the progress bar.
|
|
|
[source,xml]
|
|
|
----
|
|
|
|
|
|
- <controlDefinition name = "loadingbar" controller = "jme3test.TestLoadingScreen">
|
|
|
- <image filename="Interface/border.png" childLayout="absolute"
|
|
|
- imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15">
|
|
|
- <image id="progressbar" x="0" y="0" filename="Interface/inner.png" width="32px" height="100%"
|
|
|
- imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15"/>
|
|
|
- </image>
|
|
|
- </controlDefinition>
|
|
|
+<controlDefinition name = "loadingbar" controller = "jme3test.TestLoadingScreen">
|
|
|
+ <image filename="Interface/border.png" childLayout="absolute"
|
|
|
+ imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15">
|
|
|
+ <image id="progressbar" x="0" y="0" filename="Interface/inner.png" width="32px" height="100%"
|
|
|
+ imageMode="resize:15,2,15,15,15,2,15,2,15,2,15,15"/>
|
|
|
+ </image>
|
|
|
+</controlDefinition>
|
|
|
|
|
|
----
|
|
|
|
|
@@ -98,16 +101,16 @@ This screen simply displays a button in the middle of the screen, which could be
|
|
|
[source,xml]
|
|
|
----
|
|
|
|
|
|
- <screen id="start" controller = "jme3test.TestLoadingScreen">
|
|
|
- <layer id="layer" childLayout="center">
|
|
|
- <panel id = "panel2" height="30%" width="50%" align="center" valign="center" childLayout="vertical"
|
|
|
- visibleToMouse="true">
|
|
|
- <control id="startGame" name="button" backgroundColor="#0000" label="Load Game" align="center">
|
|
|
- <interact onClick="showLoadingMenu()" />
|
|
|
- </control>
|
|
|
- </panel>
|
|
|
- </layer>
|
|
|
- </screen>
|
|
|
+<screen id="start" controller = "jme3test.TestLoadingScreen">
|
|
|
+ <layer id="layer" childLayout="center">
|
|
|
+ <panel id = "panel2" height="30%" width="50%" align="center" valign="center" childLayout="vertical"
|
|
|
+ visibleToMouse="true">
|
|
|
+ <control id="startGame" name="button" backgroundColor="#0000" label="Load Game" align="center">
|
|
|
+ <interact onClick="showLoadingMenu()" />
|
|
|
+ </control>
|
|
|
+ </panel>
|
|
|
+ </layer>
|
|
|
+</screen>
|
|
|
|
|
|
----
|
|
|
|
|
@@ -116,15 +119,15 @@ This screen displays our custom progress bar control with a text control.
|
|
|
[source,xml]
|
|
|
----
|
|
|
|
|
|
- <screen id="loadlevel" controller = "jme3test.TestLoadingScreen">
|
|
|
- <layer id="loadinglayer" childLayout="center" backgroundColor="#000000">
|
|
|
- <panel id = "loadingpanel" childLayout="vertical" align="center" valign="center" height="32px" width="400px">
|
|
|
- <control name="loadingbar" align="center" valign="center" width="400px" height="32px" />
|
|
|
- <control id="loadingtext" name="label" align="center"
|
|
|
- text=" "/>
|
|
|
- </panel>
|
|
|
- </layer>
|
|
|
- </screen>
|
|
|
+<screen id="loadlevel" controller = "jme3test.TestLoadingScreen">
|
|
|
+ <layer id="loadinglayer" childLayout="center" backgroundColor="#000000">
|
|
|
+ <panel id = "loadingpanel" childLayout="vertical" align="center" valign="center" height="32px" width="400px">
|
|
|
+ <control name="loadingbar" align="center" valign="center" width="400px" height="32px" />
|
|
|
+ <control id="loadingtext" name="label" align="center"
|
|
|
+ text=" "/>
|
|
|
+ </panel>
|
|
|
+ </layer>
|
|
|
+</screen>
|
|
|
|
|
|
----
|
|
|
|