forked from arpit/openpyro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestLayouts.as
More file actions
34 lines (27 loc) · 736 Bytes
/
TestLayouts.as
File metadata and controls
34 lines (27 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package
{
import org.openPyro.core.UIContainer;
import org.openPyro.core.UIControl;
import org.openPyro.layout.ColumnGridLayout;
import org.openPyro.painters.FillPainter;
import flash.display.Sprite;
public class TestLayouts extends Sprite
{
public function TestLayouts()
{
stage.scaleMode = "noScale"
stage.align = "TL"
var c1:UIContainer = new UIContainer()
c1.width = c1.height = 600;
c1.backgroundPainter = new FillPainter(0xffffff)
c1.layout = new ColumnGridLayout(5, 60, 10);
addChild(c1);
for(var i:uint=0; i<20; i++){
var c:UIControl = new UIControl()
c.width = c.height = 50;
c.backgroundPainter = new FillPainter(0xcccccc);
c1.addChild(c);
}
}
}
}