Various renamery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3650 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -40,8 +40,8 @@ import com.jme.system.JmeException;
|
|||||||
import com.jme.system.PropertiesIO;
|
import com.jme.system.PropertiesIO;
|
||||||
import com.jme.system.lwjgl.LWJGLPropertiesDialog;
|
import com.jme.system.lwjgl.LWJGLPropertiesDialog;
|
||||||
|
|
||||||
import com.jme.bui.event.InputDispatcher;
|
import com.jme.bui.BRootNode;
|
||||||
import com.jme.bui.event.PolledInputDispatcher;
|
import com.jme.bui.PolledRootNode;
|
||||||
import com.jme.input.InputHandler;
|
import com.jme.input.InputHandler;
|
||||||
import com.jme.input.InputSystem;
|
import com.jme.input.InputSystem;
|
||||||
import com.jme.input.Mouse;
|
import com.jme.input.Mouse;
|
||||||
@@ -339,7 +339,8 @@ public class JmeApp
|
|||||||
_iface = new Node("Interface");
|
_iface = new Node("Interface");
|
||||||
_root.attachChild(_iface);
|
_root.attachChild(_iface);
|
||||||
|
|
||||||
_dispatcher = new PolledInputDispatcher(_timer, _input, _iface);
|
_rnode = new PolledRootNode(_timer, _input);
|
||||||
|
_iface.attachChild(_rnode);
|
||||||
// we don't hide the cursor
|
// we don't hide the cursor
|
||||||
InputSystem.getMouseInput().setCursorVisible(true);
|
InputSystem.getMouseInput().setCursorVisible(true);
|
||||||
}
|
}
|
||||||
@@ -401,11 +402,8 @@ public class JmeApp
|
|||||||
// recalculate the frame rate
|
// recalculate the frame rate
|
||||||
_timer.update();
|
_timer.update();
|
||||||
|
|
||||||
// update the input system
|
|
||||||
float timePerFrame = _timer.getTimePerFrame();
|
|
||||||
_dispatcher.update(timePerFrame);
|
|
||||||
|
|
||||||
// run all of the controllers attached to nodes
|
// run all of the controllers attached to nodes
|
||||||
|
float timePerFrame = _timer.getTimePerFrame();
|
||||||
_root.updateGeometricState(timePerFrame, true);
|
_root.updateGeometricState(timePerFrame, true);
|
||||||
|
|
||||||
// update our stats display if we have one
|
// update our stats display if we have one
|
||||||
@@ -516,8 +514,8 @@ public class JmeApp
|
|||||||
return _input;
|
return _input;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputDispatcher getInputDispatcher () {
|
public BRootNode getRootNode () {
|
||||||
return _dispatcher;
|
return _rnode;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -530,7 +528,7 @@ public class JmeApp
|
|||||||
protected Camera _camera;
|
protected Camera _camera;
|
||||||
|
|
||||||
protected InputHandler _input;
|
protected InputHandler _input;
|
||||||
protected InputDispatcher _dispatcher;
|
protected BRootNode _rnode;
|
||||||
|
|
||||||
protected long _targetFrameTicks;
|
protected long _targetFrameTicks;
|
||||||
protected boolean _finished;
|
protected boolean _finished;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import com.jme.system.DisplaySystem;
|
|||||||
import com.jme.util.awt.JMECanvas;
|
import com.jme.util.awt.JMECanvas;
|
||||||
import com.jme.util.awt.JMECanvasImplementor;
|
import com.jme.util.awt.JMECanvasImplementor;
|
||||||
|
|
||||||
import com.jme.bui.event.CanvasInputDispatcher;
|
import com.jme.bui.CanvasRootNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extends the basic {@link JmeApp} with the necessary wiring to use the
|
* Extends the basic {@link JmeApp} with the necessary wiring to use the
|
||||||
@@ -105,7 +105,8 @@ public class JmeCanvasApp extends JmeApp
|
|||||||
_iface = new Node("Interface");
|
_iface = new Node("Interface");
|
||||||
_root.attachChild(_iface);
|
_root.attachChild(_iface);
|
||||||
|
|
||||||
_dispatcher = new CanvasInputDispatcher(_iface, _canvas);
|
_rnode = new CanvasRootNode(_canvas);
|
||||||
|
_iface.attachChild(_rnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is used if we embed our GL display in an AWT component. */
|
/** This is used if we embed our GL display in an AWT component. */
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import com.jme.renderer.Renderer;
|
|||||||
import com.jme.scene.Node;
|
import com.jme.scene.Node;
|
||||||
import com.jme.system.DisplaySystem;
|
import com.jme.system.DisplaySystem;
|
||||||
|
|
||||||
import com.jme.bui.event.InputDispatcher;
|
import com.jme.bui.BRootNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides access to the various bits needed by things that operate in
|
* Provides access to the various bits needed by things that operate in
|
||||||
@@ -53,6 +53,6 @@ public interface JmeContext
|
|||||||
/** Returns our main input handler. */
|
/** Returns our main input handler. */
|
||||||
public InputHandler getInputHandler ();
|
public InputHandler getInputHandler ();
|
||||||
|
|
||||||
/** Returns our main input dispatcher. */
|
/** Returns our UI root node. */
|
||||||
public InputDispatcher getInputDispatcher ();
|
public BRootNode getRootNode ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
package com.threerings.jme.client;
|
package com.threerings.jme.client;
|
||||||
|
|
||||||
import com.jme.bui.event.InputDispatcher;
|
import com.jme.bui.BRootNode;
|
||||||
import com.jme.input.InputHandler;
|
import com.jme.input.InputHandler;
|
||||||
import com.jme.renderer.Camera;
|
import com.jme.renderer.Camera;
|
||||||
import com.jme.renderer.Renderer;
|
import com.jme.renderer.Renderer;
|
||||||
@@ -207,8 +207,8 @@ public class JabberClient
|
|||||||
// return _app.getContext().getBufferedInputHandler();
|
// return _app.getContext().getBufferedInputHandler();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public InputDispatcher getInputDispatcher () {
|
public BRootNode getRootNode () {
|
||||||
return _app.getContext().getInputDispatcher();
|
return _app.getContext().getRootNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class JabberView extends BWindow
|
|||||||
_chat = new ChatView(_jctx, _ctx.getChatDirector());
|
_chat = new ChatView(_jctx, _ctx.getChatDirector());
|
||||||
add(_chat, BorderLayout.CENTER);
|
add(_chat, BorderLayout.CENTER);
|
||||||
|
|
||||||
_jctx.getInputDispatcher().addWindow(this);
|
_jctx.getRootNode().addWindow(this);
|
||||||
setBounds(0, 40, 640, 240);
|
setBounds(0, 40, 640, 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user