package net.cis.client.game;
import net.cis.client.game.scenery.factory.SkyBoxFactory;
import net.cis.client.game.ui.hud.ctrl.VerticalProgressControl;
import net.cis.client.game.ui.util.ResourceConstants;
import com.jme3.app.SimpleApplication;
import com.jme3.niftygui.NiftyJmeDisplay;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.loaderv2.types.RegisterEffectType;
public class TestNiftyOnBoardUI extends SimpleApplication {
private Nifty nifty;
private VerticalProgressControl velocityControl;
public TestNiftyOnBoardUI() {
}
public static void main(String[] args) {
TestNiftyOnBoardUI app = new TestNiftyOnBoardUI();
app.setPauseOnLostFocus(false);
app.start();
}
@Override
public void simpleInitApp() {
NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
inputManager, audioRenderer, guiViewPort);
nifty = niftyDisplay.getNifty();
nifty.setGlobalProperties(ResourceConstants.getUserProperties());
nifty.registerEffect(new RegisterEffectType("spriteSwitch",
"net.cis.client.game.ui.effects.SpriteSwitch"));
nifty.registerEffect(new RegisterEffectType("showHide",
"net.cis.client.game.ui.effects.ShowHide"));
nifty.fromXml("hud/onBoardUISimple.xml", "onBoard");
guiViewPort.addProcessor(niftyDisplay);
inputManager.setCursorVisible(true);
rootNode.attachChild(SkyBoxFactory.createSimpleSkyBox(assetManager));
}
}