[client] apply GeometrySkin
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package ru.m.tankz;
|
||||
|
||||
import haxework.color.ColorUtil;
|
||||
import haxework.gui.core.Geometry;
|
||||
import haxework.gui.core.HAlign;
|
||||
import haxework.gui.core.VAlign;
|
||||
import haxework.gui.skin.Skin;
|
||||
import haxework.resources.IResources;
|
||||
import openfl.Assets;
|
||||
@@ -15,6 +18,10 @@ class Style {
|
||||
private static var textColor = 0xE7E0BB;
|
||||
private static var fontFamily = "Courirer New";
|
||||
|
||||
private static function iconButton():Geometry {
|
||||
return new Geometry().setSize(64, 64).setMargin(30).setPosition(ABSOLUTE);
|
||||
}
|
||||
|
||||
public static function register() {
|
||||
resources.skin.put("light", [
|
||||
Skin.color(lightColor),
|
||||
@@ -63,16 +70,16 @@ class Style {
|
||||
]);
|
||||
|
||||
resources.skin.put("button.settings", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/cog-solid.svg"), lightColor)
|
||||
Skin.geometry(iconButton().setAlign(LEFT, BOTTOM)),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/cog-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("button.close", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/times-circle-solid.svg"), lightColor)
|
||||
Skin.geometry(iconButton().setAlign(LEFT, BOTTOM)),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/times-circle-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("button.next", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/arrow-alt-circle-right-solid.svg"), lightColor)
|
||||
Skin.geometry(iconButton().setAlign(RIGHT, BOTTOM)),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/arrow-alt-circle-right-solid.svg"), lightColor),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,8 @@ views:
|
||||
$type: haxework.gui.ButtonView
|
||||
skinId: button.close
|
||||
+onPress: $code:close()
|
||||
geometry.position: absolute
|
||||
geometry.margin: 10
|
||||
geometry.vAlign: bottom
|
||||
geometry.hAlign: left
|
||||
|
||||
- id: next
|
||||
$type: haxework.gui.ButtonView
|
||||
skinId: button.next
|
||||
+onPress: $code:next()
|
||||
geometry.position: absolute
|
||||
geometry.margin: 10
|
||||
geometry.vAlign: bottom
|
||||
geometry.hAlign: right
|
||||
|
||||
@@ -17,7 +17,3 @@ views:
|
||||
$type: haxework.gui.ButtonView
|
||||
skinId: button.close
|
||||
+onPress: $this:onPress
|
||||
geometry.position: absolute
|
||||
geometry.margin: 10
|
||||
geometry.vAlign: bottom
|
||||
geometry.hAlign: left
|
||||
|
||||
@@ -35,9 +35,5 @@ views:
|
||||
text: $r:text:version
|
||||
- id: settings
|
||||
$type: haxework.gui.ButtonView
|
||||
geometry.position: absolute
|
||||
geometry.margin: 10
|
||||
geometry.vAlign: bottom
|
||||
geometry.hAlign: left
|
||||
skinId: button.settings
|
||||
+onPress: $this:onPress
|
||||
|
||||
Reference in New Issue
Block a user