update to latest Nifty 1.3.1-SNAPSHOT build especially because of consolidation of resource loading (the ResourceLoader inside of Nifty is now a part of the Nifty instance and not static anymore, see 1001faad0c for details)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8928 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
voi..om 13 years ago
parent d829bcddc3
commit fe521c76ea
  1. BIN
      engine/lib/niftygui/nifty-default-controls-javadoc.jar
  2. BIN
      engine/lib/niftygui/nifty-default-controls.jar
  3. BIN
      engine/lib/niftygui/nifty-examples-javadoc.jar
  4. BIN
      engine/lib/niftygui/nifty-examples.jar
  5. BIN
      engine/lib/niftygui/nifty-javadoc.jar
  6. BIN
      engine/lib/niftygui/nifty-style-black.jar
  7. BIN
      engine/lib/niftygui/nifty.jar
  8. 4
      engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java
  9. 9
      engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java
  10. 4
      engine/src/niftygui/com/jme3/niftygui/RenderDeviceJme.java
  11. 8
      engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java
  12. 4
      engine/src/niftygui/com/jme3/niftygui/SoundDeviceJme.java

Binary file not shown.

@ -38,6 +38,7 @@ import com.jme3.input.RawInputListener;
import com.jme3.input.event.*;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.NiftyInputConsumer;
import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
import de.lessvoid.nifty.input.keyboard.KeyboardInputEvent;
import de.lessvoid.nifty.spi.input.InputSystem;
import java.util.ArrayList;
@ -63,6 +64,9 @@ public class InputSystemJme implements InputSystem, RawInputListener {
this.inputManager = inputManager;
}
public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
}
public void setNifty(Nifty nifty) {
this.nifty = nifty;
}

@ -46,7 +46,6 @@ import com.jme3.renderer.queue.RenderQueue;
import com.jme3.texture.FrameBuffer;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.tools.TimeProvider;
import de.lessvoid.nifty.tools.resourceloader.ResourceLoader;
import de.lessvoid.nifty.tools.resourceloader.ResourceLocation;
import java.io.InputStream;
import java.net.URL;
@ -97,10 +96,6 @@ public class NiftyJmeDisplay implements SceneProcessor {
w = vp.getCamera().getWidth();
h = vp.getCamera().getHeight();
resourceLocation = new ResourceLocationJme();
ResourceLoader.removeAllResourceLocations();
ResourceLoader.addResourceLocation(resourceLocation);
soundDev = new SoundDeviceJme(assetManager, audioRenderer);
renderDev = new RenderDeviceJme(this);
inputSys = new InputSystemJme(inputManager);
@ -109,6 +104,10 @@ public class NiftyJmeDisplay implements SceneProcessor {
nifty = new Nifty(renderDev, soundDev, inputSys, new TimeProvider());
inputSys.setNifty(nifty);
resourceLocation = new ResourceLocationJme();
nifty.getResourceLoader().removeAllResourceLocations();
nifty.getResourceLoader().addResourceLocation(resourceLocation);
}
public void initialize(RenderManager rm, ViewPort vp) {

@ -54,6 +54,7 @@ import de.lessvoid.nifty.spi.render.RenderDevice;
import de.lessvoid.nifty.spi.render.RenderFont;
import de.lessvoid.nifty.spi.render.RenderImage;
import de.lessvoid.nifty.tools.Color;
import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.util.HashMap;
@ -96,6 +97,9 @@ public class RenderDeviceJme implements RenderDevice {
niftyMat.getAdditionalRenderState().setDepthTest(false);
}
public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
}
public void setRenderManager(RenderManager rm){
this.rm = rm;
this.r = rm.getRenderer();

@ -97,6 +97,14 @@ public class RenderFontJme implements RenderFont {
return result;
}
public int getWidth(final String str, final float size) {
// Note: This is supposed to return the width of the String when scaled
// with the size factor. Since I don't know how to do that with
// the font rendering in jme this will only work correctly with
// a size value of 1.f and will return inaccurate values otherwise.
return getWidth(str);
}
/**
* Return the width of the given character including kerning information.
* @param currentCharacter current character

@ -38,6 +38,7 @@ import com.jme3.audio.AudioRenderer;
import de.lessvoid.nifty.sound.SoundSystem;
import de.lessvoid.nifty.spi.sound.SoundDevice;
import de.lessvoid.nifty.spi.sound.SoundHandle;
import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
public class SoundDeviceJme implements SoundDevice {
@ -49,6 +50,9 @@ public class SoundDeviceJme implements SoundDevice {
this.ar = ar;
}
public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
}
public SoundHandle loadSound(SoundSystem soundSystem, String filename) {
AudioNode an = new AudioNode(assetManager, filename, false);
an.setPositional(false);

Loading…
Cancel
Save