More slow progress toward a test application that does chat to a Crowd

server. It looks like I'm going to have to write my own user interface
toolkit for JME as nothing exists for any Java-based GL library or engine
and precious few toolkits exist in C++. Yay!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3519 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-04-21 04:40:12 +00:00
parent fc9603fc86
commit 84d7d7a611
10 changed files with 542 additions and 46 deletions
@@ -21,6 +21,12 @@
package com.threerings.jme.client;
import com.jme.input.InputHandler;
import com.jme.renderer.Renderer;
import com.jme.scene.Node;
import com.jme.ui.UIColorScheme;
import com.jme.ui.UIFonts;
import com.samskivert.util.Config;
import com.threerings.util.MessageManager;
@@ -34,6 +40,8 @@ import com.threerings.crowd.client.OccupantDirector;
import com.threerings.crowd.client.PlaceView;
import com.threerings.crowd.util.CrowdContext;
import com.threerings.jme.JmeContext;
/**
* The Jabber client takes care of instantiating all of the proper
* managers and loading up all of the necessary configuration and getting
@@ -49,6 +57,8 @@ public class JabberClient
*/
public void init (JabberApp app)
{
_app = app;
// create our context
_ctx = createContextImpl();
@@ -125,7 +135,7 @@ public class JabberClient
* The context implementation. This provides access to all of the
* objects and services that are needed by the operating client.
*/
protected class JabberContextImpl implements CrowdContext
protected class JabberContextImpl implements CrowdContext, JmeContext
{
/**
* Apparently the default constructor has default access, rather
@@ -133,52 +143,68 @@ public class JabberClient
* protected. Why, I don't know, but we need to be able to extend
* this class elsewhere, so we need this.
*/
protected JabberContextImpl ()
{
protected JabberContextImpl () {
}
public Client getClient ()
{
public Client getClient () {
return _client;
}
public DObjectManager getDObjectManager ()
{
public DObjectManager getDObjectManager () {
return _client.getDObjectManager();
}
public Config getConfig ()
{
public Config getConfig () {
return _config;
}
public LocationDirector getLocationDirector ()
{
public LocationDirector getLocationDirector () {
return _locdir;
}
public OccupantDirector getOccupantDirector ()
{
public OccupantDirector getOccupantDirector () {
return _occdir;
}
public ChatDirector getChatDirector ()
{
public ChatDirector getChatDirector () {
return _chatdir;
}
public void setPlaceView (PlaceView view)
{
public void setPlaceView (PlaceView view) {
// TBD
}
public void clearPlaceView (PlaceView view)
{
public void clearPlaceView (PlaceView view) {
// we'll just let the next place view replace our old one
}
public Renderer getRenderer () {
return _app.getContext().getRenderer();
}
public Node getRoot () {
return _app.getContext().getRoot();
}
public InputHandler getInputHandler () {
return _app.getContext().getInputHandler();
}
public InputHandler getBufferedInputHandler () {
return _app.getContext().getBufferedInputHandler();
}
public UIColorScheme getColorScheme () {
return _app.getContext().getColorScheme();
}
public UIFonts getFonts () {
return _app.getContext().getFonts();
}
}
protected CrowdContext _ctx;
protected JabberApp _app;
protected Config _config = new Config("jabber");
protected Client _client;