-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi Joshua, and thank you for another (reborn) lib!
I'm a bit confused about the init values for the LayoutManager:
In the example below, one (100x100) sprite is to be managed.
If I don't feed the LayoutManager with (100, 100), then it doesn't work...
Does this mean that I have to feed the LayoutManager with the initial size of every object, or am I missing something here..?
/ Jonas
class Main extends Sprite
{
var layoutManager:LayoutManager;
function init()
{
var sprite:Sprite = new Sprite();
sprite.graphics.beginFill(0xFF0000);
sprite.graphics.drawRect(0, 0, 100, 100);
this.addChild(sprite);
layoutManager = new LayoutManager(100, 100); // <-- Needs to be same size as the sprite to manage???
layoutManager.addItem(new LayoutItem(sprite, LayoutType.RIGHT, LayoutType.BOTTOM));
layoutManager.layoutItems();
resize();
}
function resize(e:Event=null)
{
layoutManager.resize(Lib.current.stage.stageWidth, Lib.current.stage.stageHeight);
}
...
Metadata
Metadata
Assignees
Labels
No labels