Minor restructuring to allow derived simulator applications to specialize
their logon behaviour to suit their needs. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1932 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ClientController.java,v 1.8 2002/09/20 00:54:39 mdb Exp $
|
||||
// $Id: ClientController.java,v 1.9 2002/11/12 01:42:28 shaper Exp $
|
||||
|
||||
package com.threerings.micasa.simulator.client;
|
||||
|
||||
@@ -7,11 +7,10 @@ import java.awt.event.ActionEvent;
|
||||
import com.samskivert.swing.Controller;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.presents.dobj.*;
|
||||
import com.threerings.presents.client.*;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.SessionObserver;
|
||||
|
||||
import com.threerings.crowd.client.*;
|
||||
import com.threerings.crowd.data.*;
|
||||
import com.threerings.crowd.data.BodyObject;
|
||||
|
||||
import com.threerings.parlor.game.GameConfig;
|
||||
import com.threerings.parlor.util.ParlorContext;
|
||||
@@ -67,6 +66,12 @@ public class ClientController extends Controller
|
||||
// keep the body object around for stuff
|
||||
_body = (BodyObject)client.getClientObject();
|
||||
|
||||
// have at it
|
||||
createGame(client);
|
||||
}
|
||||
|
||||
public void createGame (Client client)
|
||||
{
|
||||
GameConfig config = null;
|
||||
try {
|
||||
// create the game config object
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SimulatorApp.java,v 1.11 2002/07/15 03:09:29 mdb Exp $
|
||||
// $Id: SimulatorApp.java,v 1.12 2002/11/12 01:42:28 shaper Exp $
|
||||
|
||||
package com.threerings.micasa.simulator.client;
|
||||
|
||||
@@ -41,8 +41,7 @@ public class SimulatorApp
|
||||
_client = createSimulatorClient(_frame);
|
||||
|
||||
// set up the top-level client controller
|
||||
Controller ctrl = new ClientController(
|
||||
_client.getParlorContext(), _frame, siminfo);
|
||||
Controller ctrl = createController(siminfo);
|
||||
_frame.setController(ctrl);
|
||||
|
||||
// create the server
|
||||
@@ -84,6 +83,12 @@ public class SimulatorApp
|
||||
return new SimpleClient(_frame);
|
||||
}
|
||||
|
||||
protected ClientController createController (SimulatorInfo siminfo)
|
||||
{
|
||||
return new ClientController(
|
||||
_client.getParlorContext(), _frame, siminfo);
|
||||
}
|
||||
|
||||
public void run ()
|
||||
{
|
||||
// configure and display the main frame
|
||||
|
||||
Reference in New Issue
Block a user