[client] add button.level skin
This commit is contained in:
@@ -47,5 +47,10 @@ class Style {
|
||||
resources.skin.put("border", [
|
||||
Skin.border(ColorUtils.multiply(lightColor, 1.5), 1, 2),
|
||||
]);
|
||||
resources.skin.put("button.level", [
|
||||
Skin.buttonColor(lightColor),
|
||||
Skin.text(textColor, 24, fontFamily),
|
||||
Skin.size(64, 64),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ views:
|
||||
$type: haxework.gui.DataView<Int>
|
||||
layout:
|
||||
$type: haxework.gui.layout.TailLayout
|
||||
margin: 2
|
||||
margin: 5
|
||||
factory: $this:levelViewFactory
|
||||
+onDataSelect: $code:function(value) level = value
|
||||
geometry.size.stretch: true
|
||||
|
||||
@@ -53,7 +53,7 @@ class LevelFrame extends GroupView {
|
||||
private function levelViewFactory(index:Int, level:Int):ButtonView {
|
||||
var view = new ButtonView();
|
||||
view.text = '${level}';
|
||||
resources.skin.bind("button.simple", view, "skin");
|
||||
resources.skin.bind("button.level", view, "skin");
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ views:
|
||||
$type: haxework.gui.DataView<Int>
|
||||
layout:
|
||||
$type: haxework.gui.layout.TailLayout
|
||||
margin: 2
|
||||
margin: 5
|
||||
factory: $this:levelViewFactory
|
||||
+onDataSelect: $code:function(value) level = value
|
||||
geometry.size.percent: [50, 100]
|
||||
|
||||
Reference in New Issue
Block a user