[macro] update template parser

This commit is contained in:
2019-02-07 12:24:13 +03:00
parent 9182210001
commit eeb659622c
7 changed files with 74 additions and 69 deletions

View File

@@ -2,30 +2,27 @@
$type: haxework.gui.VGroupView
paddings: 20
layoutMargin: 10
# skin:
# $type: haxework.gui.skin.ColorSkin
# color: 0xff0000
skin: [ $type: [haxework.gui.skin.Skin.color, 0xff0000] ]
views:
- id: list
$type: haxework.gui.list.VListView<String>
factory: $class:haxework.gui.list.LabelListItem
+onItemSelect: $this:onItemSelect
factory: { $class: haxework.gui.list.LabelListItem }
pWidth: 100
pHeight: 100
leftMargin: 5
rightMargin: 10
scroll:
$type: haxework.gui.list.VScrollView
width: 10
pHeight: 100
skin: [ "$class:haxework.gui.list.ScrollSkin.vertical(0xcccccc,0x555555)" ]
skin: [$class:haxework.gui.skin.Skin.color(0xffffff)]
skin: [ $type: [haxework.gui.list.ScrollSkin.vertical, 0xcffcc, 0x55cc55] ]
skin: [ $type: [haxework.gui.skin.Skin.color, 0xffffff] ]
- $type: haxework.gui.SpriteView
vAlign: BOTTOM
width: 50
height: 50
leftMargin: 5
rightMargin: 10
skin: [$class:haxework.gui.skin.Skin.color(0x0000ff)]
skin: [ $type: [haxework.gui.skin.Skin.color, 0x0000ff] ]
- id: panel
$type: haxework.gui.HGroupView
layoutHAlign: RIGHT
@@ -33,32 +30,28 @@ views:
height: 30
paddings: 3
layoutMargin: 3
skin: [$class:haxework.gui.skin.Skin.color(0xffff00)]
skin: [ $type: [haxework.gui.skin.Skin.color, 0xffff00] ]
views:
- id: button1
$type: haxework.gui.ButtonView
+onPress: $this:onPress
width: 100
pHeight: 100
skin: [$class:haxework.gui.skin.ButtonSkin.color(0xcc0000)]
# skin:
# $type: haxework.gui.skin.ButtonColorSkin
# color: 0xcc0000
skin: [ $type: [haxework.gui.skin.ButtonSkin.color, 0xcc0000] ]
text: Text1
- id: button2
$type: haxework.gui.ButtonView
+onPress: $this:onPress
contentSize: true
# skin:
# $type: haxework.gui.skin.ButtonColorSkin
# color: 0x00cc00
skin: [ $type: [haxework.gui.skin.ButtonSkin.color, 0x00cc00] ]
text: Text2
fontFamily: Georgia
fontColor: 0xffffff
- id: button3
$type: haxework.gui.ButtonView
+onPress: $this:onPress
contentSize: true
# skin:
# $type: haxework.gui.skin.ButtonColorSkin
# color: 0x00cccc
skin: [ $type: [haxework.gui.skin.ButtonSkin.color, 0x00cccc] ]
text: Text 3333333333 ddd
fontFamily: Tahoma
fontColor: 0xff0000