* Fixed crash in TestNiftyGui by moving hellojme.xml to test-data
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7573 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
76ee2a3489
commit
eed0a864f0
@ -30,7 +30,7 @@
|
|||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.jme3.animation;
|
package com.jme3.scene.plugins.ogre;
|
||||||
|
|
||||||
//import static com.jmex.model.XMLUtil.getAttribute;
|
//import static com.jmex.model.XMLUtil.getAttribute;
|
||||||
//import static com.jmex.model.XMLUtil.getIntAttribute;
|
//import static com.jmex.model.XMLUtil.getIntAttribute;
|
@ -41,8 +41,7 @@ import com.jme3.scene.shape.Box;
|
|||||||
import de.lessvoid.nifty.Nifty;
|
import de.lessvoid.nifty.Nifty;
|
||||||
import de.lessvoid.nifty.screen.Screen;
|
import de.lessvoid.nifty.screen.Screen;
|
||||||
import de.lessvoid.nifty.screen.ScreenController;
|
import de.lessvoid.nifty.screen.ScreenController;
|
||||||
import java.util.logging.Level;
|
import java.net.URL;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class TestNiftyGui extends SimpleApplication implements ScreenController {
|
public class TestNiftyGui extends SimpleApplication implements ScreenController {
|
||||||
|
|
||||||
@ -68,7 +67,9 @@ public class TestNiftyGui extends SimpleApplication implements ScreenController
|
|||||||
guiViewPort);
|
guiViewPort);
|
||||||
nifty = niftyDisplay.getNifty();
|
nifty = niftyDisplay.getNifty();
|
||||||
|
|
||||||
nifty.fromXml("Tests/hellojme.xml", "start", this);
|
URL url = Thread.currentThread().getContextClassLoader().getResource("jme3test/niftygui/hellojme.xml");
|
||||||
|
|
||||||
|
nifty.fromXml("Interface/Nifty/HelloJme.xml", "start", this);
|
||||||
|
|
||||||
// attach the nifty display to the gui view port as a processor
|
// attach the nifty display to the gui view port as a processor
|
||||||
guiViewPort.addProcessor(niftyDisplay);
|
guiViewPort.addProcessor(niftyDisplay);
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<nifty>
|
|
||||||
<screen id="start" controller="jme3test.niftygui.TestNiftyGui">
|
|
||||||
<layer id="layer" backgroundColor="#0000" childLayout="center">
|
|
||||||
<panel id="panel" height="25%" width="35%" align="center" valign="center" backgroundColor="#f60f" childLayout="center" visibleToMouse="true">
|
|
||||||
<interact onClick="quit()"/>
|
|
||||||
<effect>
|
|
||||||
<onStartScreen name="move" mode="in" direction="top" length="300" startDelay="0" inherit="true"/>
|
|
||||||
<onEndScreen name="move" mode="out" direction="bottom" length="300" startDelay="0" inherit="true"/>
|
|
||||||
<onHover name="pulsate" scaleFactor="0.008" startColor="#f600" endColor="#ffff" post="true"/>
|
|
||||||
</effect>
|
|
||||||
<text id="text" font="aurulent-sans-16.fnt" color="#000f" text="Hello from jME3" align="center" valign="center" />
|
|
||||||
</panel>
|
|
||||||
</layer>
|
|
||||||
</screen>
|
|
||||||
<screen id="end">
|
|
||||||
</screen>
|
|
||||||
</nifty>
|
|
Loading…
x
Reference in New Issue
Block a user