Added a method: getSize()

and a new event: SizeChangedEvent.

So that games can query and listen for changes to the size of their
display area.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@470 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-10-24 22:56:31 +00:00
parent 00723e90bf
commit 51f2b4b9d2
4 changed files with 130 additions and 5 deletions
@@ -80,6 +80,16 @@ public class EZGamePanel extends Canvas
backend.shutdown();
}
override protected function updateDisplayList (uw :Number, uh :Number) :void
{
super.updateDisplayList(uw, uh);
// TODO: debugging. Remove.
trace("UpdateDisplayList: " + uw + ":" + _gameView.width + ", " +
uh + ":" + _gameView.height);
backend.sizeChanged();
}
/**
* Creates the backend object that will handle requests from user code.
*/
@@ -93,7 +103,7 @@ public class EZGamePanel extends Canvas
view.percentWidth = 100;
view.percentHeight = 100;
}
protected var _ctx :CrowdContext;
protected var _ctrl :EZGameController;
protected var _gameView :GameContainer;