Allow our derived class to override our width/height configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@460 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -64,8 +64,7 @@ public class EZGamePanel extends Canvas
|
|||||||
backend = createBackend();
|
backend = createBackend();
|
||||||
|
|
||||||
_gameView = new GameContainer(cfg.getGameDefinition().getMediaPath(cfg.getGameId()));
|
_gameView = new GameContainer(cfg.getGameDefinition().getMediaPath(cfg.getGameId()));
|
||||||
_gameView.percentWidth = 100;
|
configureGameView(_gameView);
|
||||||
_gameView.percentHeight = 100;
|
|
||||||
backend.setSharedEvents(
|
backend.setSharedEvents(
|
||||||
Loader(_gameView.getMediaContainer().getMedia()).contentLoaderInfo.sharedEvents);
|
Loader(_gameView.getMediaContainer().getMedia()).contentLoaderInfo.sharedEvents);
|
||||||
backend.setContainer(_gameView);
|
backend.setContainer(_gameView);
|
||||||
@@ -88,12 +87,16 @@ public class EZGamePanel extends Canvas
|
|||||||
{
|
{
|
||||||
return new GameControlBackend(_ctx, _ezObj, _ctrl);
|
return new GameControlBackend(_ctx, _ezObj, _ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function configureGameView (view :GameContainer) :void
|
||||||
|
{
|
||||||
|
view.percentWidth = 100;
|
||||||
|
view.percentHeight = 100;
|
||||||
|
}
|
||||||
|
|
||||||
protected var _ctx :CrowdContext;
|
protected var _ctx :CrowdContext;
|
||||||
protected var _ctrl :EZGameController;
|
protected var _ctrl :EZGameController;
|
||||||
|
|
||||||
protected var _gameView :GameContainer;
|
protected var _gameView :GameContainer;
|
||||||
|
|
||||||
protected var _ezObj :EZGameObject;
|
protected var _ezObj :EZGameObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user