• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


コミットメタ情報

リビジョン42f9b6aee5d7ccc57402ed35b746ca145ca9105d (tree)
日時2013-12-28 14:10:51
作者kobayasi <kobayasi@pscn...>
コミッターkobayasi

ログメッセージ

Update niftygui 1.3.3

変更サマリ

差分

--- a/engine/lib/niftygui/VERSION.txt
+++ b/engine/lib/niftygui/VERSION.txt
@@ -1,8 +1,9 @@
1-Last Updated 6/30/2011
1+Last Updated 22/6/2013
22
33 Component Version
44 ---------------------------------------------------------------------
5-nifty nifty-1.3
6-nifty-default-controls nifty-default-controls-1.3
7-nifty-style-black nifty-style-black-1.3
8-nifty-examples nifty-examples-1.3
\ No newline at end of file
5+nifty 1.3.3 (2013-06-20 23:54:54)
6+nifty-default-controls 1.3.3 (2013-06-20 23:54:54)
7+nifty-style-black 1.3.3 (2013-06-20 23:54:54)
8+nifty-examples 1.3.3 (2013-06-20 23:54:54)
9+jglfont-core 1.3
Binary files /dev/null and b/engine/lib/niftygui/jglfont-core-javadoc.jar differ
Binary files /dev/null and b/engine/lib/niftygui/jglfont-core.jar differ
Binary files a/engine/lib/niftygui/nifty-default-controls-javadoc.jar and b/engine/lib/niftygui/nifty-default-controls-javadoc.jar differ
Binary files a/engine/lib/niftygui/nifty-default-controls.jar and b/engine/lib/niftygui/nifty-default-controls.jar differ
Binary files a/engine/lib/niftygui/nifty-examples-javadoc.jar and b/engine/lib/niftygui/nifty-examples-javadoc.jar differ
Binary files a/engine/lib/niftygui/nifty-examples.jar and b/engine/lib/niftygui/nifty-examples.jar differ
Binary files a/engine/lib/niftygui/nifty-javadoc.jar and b/engine/lib/niftygui/nifty-javadoc.jar differ
Binary files a/engine/lib/niftygui/nifty-style-black.jar and b/engine/lib/niftygui/nifty-style-black.jar differ
Binary files a/engine/lib/niftygui/nifty.jar and b/engine/lib/niftygui/nifty.jar differ
--- a/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java
+++ b/engine/src/niftygui/com/jme3/niftygui/InputSystemJme.java
@@ -47,6 +47,7 @@ import de.lessvoid.nifty.Nifty;
4747 import de.lessvoid.nifty.NiftyInputConsumer;
4848 import de.lessvoid.nifty.input.keyboard.KeyboardInputEvent;
4949 import de.lessvoid.nifty.spi.input.InputSystem;
50+import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
5051 import java.util.ArrayList;
5152
5253 public class InputSystemJme implements InputSystem, RawInputListener {
@@ -70,6 +71,9 @@ public class InputSystemJme implements InputSystem, RawInputListener {
7071 this.inputManager = inputManager;
7172 }
7273
74+ public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
75+ }
76+
7377 public void setNifty(Nifty nifty) {
7478 this.nifty = nifty;
7579 }
--- a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java
+++ b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java
@@ -45,8 +45,8 @@ import com.jme3.renderer.ViewPort;
4545 import com.jme3.renderer.queue.RenderQueue;
4646 import com.jme3.texture.FrameBuffer;
4747 import de.lessvoid.nifty.Nifty;
48+import de.lessvoid.nifty.spi.time.impl.FastTimeProvider;
4849 import de.lessvoid.nifty.tools.TimeProvider;
49-import de.lessvoid.nifty.tools.resourceloader.ResourceLoader;
5050 import de.lessvoid.nifty.tools.resourceloader.ResourceLocation;
5151 import java.io.InputStream;
5252 import java.net.URL;
@@ -97,18 +97,18 @@ public class NiftyJmeDisplay implements SceneProcessor {
9797 w = vp.getCamera().getWidth();
9898 h = vp.getCamera().getHeight();
9999
100- resourceLocation = new ResourceLocationJme();
101- ResourceLoader.removeAllResourceLocations();
102- ResourceLoader.addResourceLocation(resourceLocation);
103-
104100 soundDev = new SoundDeviceJme(assetManager, audioRenderer);
105101 renderDev = new RenderDeviceJme(this);
106102 inputSys = new InputSystemJme(inputManager);
107103 if (inputManager != null)
108104 inputManager.addRawInputListener(inputSys);
109105
110- nifty = new Nifty(renderDev, soundDev, inputSys, new TimeProvider());
106+ nifty = new Nifty(renderDev, soundDev, inputSys, new FastTimeProvider());
111107 inputSys.setNifty(nifty);
108+
109+ resourceLocation = new ResourceLocationJme();
110+ nifty.getResourceLoader().removeAllResourceLocations();
111+ nifty.getResourceLoader().addResourceLocation(resourceLocation);
112112 }
113113
114114 public void initialize(RenderManager rm, ViewPort vp) {
--- a/engine/src/niftygui/com/jme3/niftygui/RenderDeviceJme.java
+++ b/engine/src/niftygui/com/jme3/niftygui/RenderDeviceJme.java
@@ -51,6 +51,7 @@ import de.lessvoid.nifty.elements.render.TextRenderer.RenderFontNull;
5151 import de.lessvoid.nifty.render.BlendMode;
5252 import de.lessvoid.nifty.spi.render.*;
5353 import de.lessvoid.nifty.tools.Color;
54+import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
5455 import java.nio.ByteBuffer;
5556 import java.nio.FloatBuffer;
5657 import java.util.HashMap;
@@ -93,6 +94,9 @@ public class RenderDeviceJme implements RenderDevice {
9394 niftyMat.getAdditionalRenderState().setDepthTest(false);
9495 }
9596
97+ public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
98+ }
99+
96100 public void setRenderManager(RenderManager rm){
97101 this.rm = rm;
98102 this.r = rm.getRenderer();
@@ -187,7 +191,7 @@ public class RenderDeviceJme implements RenderDevice {
187191 quadColor.updateData(buf);
188192 }
189193
190- public void renderFont(RenderFont font, String str, int x, int y, Color color, float size){
194+ public void renderFont(RenderFont font, String str, int x, int y, Color color, float sizeX, float sizeY) {
191195 if (str.length() == 0)
192196 return;
193197
@@ -214,12 +218,12 @@ public class RenderDeviceJme implements RenderDevice {
214218 float width = text.getLineWidth();
215219 float height = text.getLineHeight();
216220
217- float x0 = x + 0.5f * width * (1f - size);
218- float y0 = y + 0.5f * height * (1f - size);
221+ float x0 = x + 0.5f * width * (1f - sizeX);
222+ float y0 = y + 0.5f * height * (1f - sizeY);
219223
220224 tempMat.loadIdentity();
221225 tempMat.setTranslation(x0, getHeight() - y0, 0);
222- tempMat.setScale(size, size, 0);
226+ tempMat.setScale(sizeX, sizeY, 0);
223227
224228 rm.setWorldMatrix(tempMat);
225229 text.render(rm);
--- a/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java
+++ b/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java
@@ -97,6 +97,14 @@ public class RenderFontJme implements RenderFont {
9797 return result;
9898 }
9999
100+ public int getWidth(final String str, final float size) {
101+ // Note: This is supposed to return the width of the String when scaled
102+ // with the size factor. Since I don't know how to do that with
103+ // the font rendering in jme this will only work correctly with
104+ // a size value of 1.f and will return inaccurate values otherwise.
105+ return getWidth(str);
106+ }
107+
100108 /**
101109 * Return the width of the given character including kerning information.
102110 * @param currentCharacter current character
--- a/engine/src/niftygui/com/jme3/niftygui/SoundDeviceJme.java
+++ b/engine/src/niftygui/com/jme3/niftygui/SoundDeviceJme.java
@@ -38,6 +38,7 @@ import com.jme3.audio.AudioRenderer;
3838 import de.lessvoid.nifty.sound.SoundSystem;
3939 import de.lessvoid.nifty.spi.sound.SoundDevice;
4040 import de.lessvoid.nifty.spi.sound.SoundHandle;
41+import de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader;
4142
4243 public class SoundDeviceJme implements SoundDevice {
4344
@@ -49,6 +50,9 @@ public class SoundDeviceJme implements SoundDevice {
4950 this.ar = ar;
5051 }
5152
53+ public void setResourceLoader(NiftyResourceLoader niftyResourceLoader) {
54+ }
55+
5256 public SoundHandle loadSound(SoundSystem soundSystem, String filename) {
5357 AudioNode an = new AudioNode(assetManager, filename, false);
5458 an.setPositional(false);