refactored package
This commit is contained in:
37
examples/ViewExample.hx
Executable file
37
examples/ViewExample.hx
Executable file
@@ -0,0 +1,37 @@
|
||||
package examples;
|
||||
|
||||
import flash.Lib;
|
||||
import haxework.gui.skin.ColorSkin;
|
||||
import haxework.gui.View;
|
||||
import haxework.gui.IView;
|
||||
import flash.display.Sprite;
|
||||
import haxework.gui.GroupView;
|
||||
import haxework.gui.IGroupView;
|
||||
|
||||
class ViewExample {
|
||||
|
||||
public static function main() {
|
||||
View.updater.stage = Lib.current.stage;
|
||||
|
||||
var group:IGroupView<Sprite> = new GroupView();
|
||||
group.width = 400;
|
||||
group.height = 400;
|
||||
group.skin = new ColorSkin(0xffff00);
|
||||
var view:IView<Sprite> = new View();
|
||||
view.width = 200;
|
||||
view.height = 200;
|
||||
view.skin = new ColorSkin(0xff0000);
|
||||
group.addView(view);
|
||||
view = new View();
|
||||
view.width = 100;
|
||||
view.height = 100;
|
||||
view.skin = new ColorSkin(0x00ff00);
|
||||
group.addView(view);
|
||||
view = new View();
|
||||
view.width = 50;
|
||||
view.height = 50;
|
||||
view.skin = new ColorSkin(0x0000ff);
|
||||
group.addView(view);
|
||||
Lib.current.addChild(group.content);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user