|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.parlor.game.client.GameConfigurator
public abstract class GameConfigurator
Provides the base from which interfaces can be built to configure games prior to starting them. Derived classes would extend the base configurator adding interface elements and wiring them up properly to allow the user to configure an instance of their game.
Clients that use the game configurator will want to instantiate one based on the class
returned from the GameConfig and then initialize it with a call to init(com.threerings.parlor.util.ParlorContext).
| Field Summary | |
|---|---|
protected GameConfig |
_config
Our game configuration. |
protected ParlorContext |
_ctx
Provides access to client services. |
| Constructor Summary | |
|---|---|
GameConfigurator()
|
|
| Method Summary | |
|---|---|
protected void |
createConfigInterface()
The default implementation creates nothing. |
protected void |
flushGameConfig()
Derived classes will want to override this method, flushing values from the user interface to the game config object so that it is properly configured prior to being returned to the getGameConfig() caller. |
GameConfig |
getGameConfig()
Obtains a configured game configuration. |
protected void |
gotGameConfig()
Derived classes will likely want to override this method and configure their user interface elements accordingly. |
void |
init(ParlorContext ctx)
Initializes this game configurator, creates its user interface elements and prepares it for display. |
void |
setGameConfig(GameConfig config)
Provides this configurator with its configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ParlorContext _ctx
protected GameConfig _config
| Constructor Detail |
|---|
public GameConfigurator()
| Method Detail |
|---|
public void init(ParlorContext ctx)
protected void createConfigInterface()
public void setGameConfig(GameConfig config)
protected void gotGameConfig()
public GameConfig getGameConfig()
protected void flushGameConfig()
getGameConfig() caller.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||