Package com.jme3.niftygui

Examples of com.jme3.niftygui.NiftyJmeDisplay

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics

 
  public void update(float tpf) {
    if (!isFinished()) {
      updateTimer(tpf);
      float p = getProgress();
      Vector3f tar = target.getLocalTranslation();
      Vector3f route = tar.subtract(start);
      route.multLocal(p);
      Vector3f newPos = start.add(route);
      position.setLocalTranslation(newPos);
    }
  }
View Full Code Here


        // init Camera --------------------------------
       
        cam = new Camera(settings.getWidth(), settings.getHeight());

        cam.setFrustumPerspective(45f, (float)cam.getWidth() / cam.getHeight(), 1f, 1000f);
        cam.setLocation(new Vector3f(0f, 0f, 10f));
        cam.lookAt(new Vector3f(0f, 0f, 0f), Vector3f.UNIT_Y);
       

        renderManager = new RenderManager(renderer);
        //Remy - 09/14/2010 setted the timer in the renderManager
        renderManager.setTimer(timer);
View Full Code Here

  }
 
  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
   
    test = new Planet(app.getAssetManager(), "Earth", "Textures/Planets/Earth/Earth.jpg", "Textures/Planets/Clouds/Cloud1.jpg", 60, new Vector3f(600, 0, 0), true, null);
    mapNode.attachChild(test);
   
    Planet test2 = new Planet(app.getAssetManager(), "Uriel", "Textures/Planets/Uriel/Uriel.jpg", null, 60, new Vector3f(0, 0, 600), false, null);
    mapNode.attachChild(test2);
   
    Planet test3 = new Planet(app.getAssetManager(), "Dominion", "Textures/Planets/Dominion/Dominion.jpg", null, 60, new Vector3f(-600, 0, 0), true, new Vector3f(0.4f, 0.6f, 0.7f));
    mapNode.attachChild(test3);
   
   
    /*
    Planet perun = new Planet("Perun", "perun2.jpg", 60);
View Full Code Here

              // clean destroy audio environemt
              ar.cleanup();
                stop();
            } else if (name.equals("SIMPLEAPP_CameraPos")) {
                if (cam != null) {
                    Vector3f loc = cam.getLocation();
                    Quaternion rot = cam.getRotation();
                    System.out.println("Camera Position: ("
                            + loc.x + ", " + loc.y + ", " + loc.z + ")");
                    System.out.println("Camera Rotation: " + rot);
                    System.out.println("Camera Direction: " + cam.getDirection());
View Full Code Here

    public void load(int level) {
        //load any nifty effects and uiImages on the screen
    }

    private void initialiseNifty() {
        NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(myApp.getAssetManager(),
                myApp.getInputManager(),
                myApp.getAudioRenderer(),
                myApp.getGuiViewPort());
        nifty = niftyDisplay.getNifty();

        nifty.enableAutoScaling(1280, 720);
        myApp.getGuiViewPort().addProcessor(niftyDisplay);
        //nifty.setDebugOptionPanelColors(true);
    }
View Full Code Here

        Logger.getLogger("").setLevel(Level.SEVERE);
    }

    @Override
    public void simpleInitApp() {
        NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager, inputManager, audioRenderer, guiViewPort);
        this.nifty = niftyDisplay.getNifty();

        // todo remove
        assetManager.registerLocator("/media/f9157386-4243-4142-836c-e97e978bb8ba/media/devel/src/java/client/jCaster/res", FileLocator.class);
        nifty.fromXml("gui/gui.xml", "login", controller);
        guiViewPort.addProcessor(niftyDisplay);
View Full Code Here

  }

  @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"));
View Full Code Here

    FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
    BloomFilter bloom = new BloomFilter(BloomFilter.GlowMode.Objects);
    fpp.addFilter(bloom);
    viewPort.addProcessor(fpp);
   
    NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
        inputManager, audioRenderer, guiViewPort);
    nifty = niftyDisplay.getNifty();
    nifty.setGlobalProperties(ResourceConstants.getUserProperties());
    nifty.fromXml("login/characterUI.xml", "characterUI", new CharacterViewUIController(this));

    guiViewPort.addProcessor(niftyDisplay);
View Full Code Here

  }

  @Override
  public void simpleInitApp() {

    NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
        inputManager, audioRenderer, guiViewPort);
    nifty = niftyDisplay.getNifty();
    nifty.fromXml("assets/Interface/LoginScreen/loginScreen.xml", "start", new LoginScreen(null));
    guiViewPort.addProcessor(niftyDisplay);
    inputManager.setCursorVisible(true);
  }
View Full Code Here

  }

  @Override
  public void simpleInitApp() {

    NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
        inputManager, audioRenderer, guiViewPort);
    nifty = niftyDisplay.getNifty();
    nifty.setGlobalProperties(ResourceConstants.getUserProperties());
    nifty.fromXml("hud/onBoardUI.xml", "onBoard");

    guiViewPort.addProcessor(niftyDisplay);
    inputManager.setCursorVisible(true);
View Full Code Here

TOP

Related Classes of com.jme3.niftygui.NiftyJmeDisplay

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.