[client] update LevelPopup
This commit is contained in:
@@ -21,6 +21,7 @@ class Style {
|
||||
public static var lightColor = 0x95937D;
|
||||
public static var darkColor = 0x777564;
|
||||
public static var textColor = 0xE7E0BB;
|
||||
public static var activeColor = 0xFFFF00;
|
||||
|
||||
public static var baseFontSize = 18;
|
||||
public static var bigFontSize = 22;
|
||||
@@ -88,6 +89,11 @@ class Style {
|
||||
Skin.text(textColor, baseFontSize, fontFamily, fontEmbed),
|
||||
Skin.geometry(new Geometry().setPadding([25, 8])),
|
||||
]);
|
||||
resources.skin.put("button.simple.active", [
|
||||
Skin.buttonColor(lightColor, activeColor),
|
||||
Skin.text(activeColor, baseFontSize, fontFamily, fontEmbed),
|
||||
Skin.geometry(new Geometry().setPadding([25, 8])),
|
||||
]);
|
||||
resources.skin.put("button.tab", [
|
||||
Skin.tabColor(lightColor),
|
||||
Skin.text(textColor, baseFontSize, fontFamily, fontEmbed),
|
||||
@@ -117,6 +123,10 @@ class Style {
|
||||
Skin.border(ColorUtil.multiply(lightColor, 1.5), 1, 2),
|
||||
Skin.geometry(new Geometry().setPadding(2)),
|
||||
]);
|
||||
resources.skin.put("window.close", [
|
||||
Skin.size(36, 36),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/window-close-solid.svg"), lightColor),
|
||||
]);
|
||||
|
||||
resources.skin.put("button.settings", [
|
||||
Skin.size(64, 64),
|
||||
@@ -134,38 +144,5 @@ class Style {
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/play-circle-solid.svg"), lightColor),
|
||||
]);
|
||||
|
||||
resources.skin.put("preset.easy", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/smile-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("preset.normal", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/frown-open-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("preset.hard", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/sad-cry-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("preset.default", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/play-circle-solid.svg"), lightColor),
|
||||
]);
|
||||
resources.skin.put("preset.easy.complete", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/smile-solid.svg"), 0x337733),
|
||||
]);
|
||||
resources.skin.put("preset.normal.complete", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/frown-open-solid.svg"), 0x337733),
|
||||
]);
|
||||
resources.skin.put("preset.hard.complete", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/sad-cry-solid.svg"), 0x337733),
|
||||
]);
|
||||
resources.skin.put("preset.default.complete", [
|
||||
Skin.size(64, 64),
|
||||
new ButtonSVGSkin(Assets.getText("resources/image/icon/play-circle-solid.svg"), 0x337733),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ import ru.m.tankz.game.GameProgress;
|
||||
|
||||
private function presetViewFactory(index:Int, value:GamePreset):ButtonView {
|
||||
var result = new ButtonView();
|
||||
result.skinId = 'preset.${value.name}${progress.isPresetCompleted(level.id, value.id) ? '.complete' : ''}';
|
||||
result.skinId = 'button.simple${!progress.isPresetCompleted(level.id, value.id) ? ".active" : ""}';
|
||||
result.text = value.name;
|
||||
result.disabled = !progress.isPresetAvailable(level.id, value.id);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,20 @@ view:
|
||||
geometry.size.height: 400
|
||||
skinId: window
|
||||
views:
|
||||
- id: name
|
||||
$type: haxework.view.LabelView
|
||||
skinId: text
|
||||
geometry.padding: [20, 15]
|
||||
- $type: haxework.view.HGroupView
|
||||
geometry.size.width: 100%
|
||||
geometry.padding: 10
|
||||
layout.vAlign: middle
|
||||
views:
|
||||
- id: name
|
||||
$type: haxework.view.LabelView
|
||||
geometry.size.width: 100%
|
||||
geometry.margin.left: 10
|
||||
layout.hAlign: left
|
||||
skinId: text
|
||||
- $type: haxework.view.ButtonView
|
||||
skinId: window.close
|
||||
+onPress: $code:reject('close')
|
||||
- $type: haxework.view.SpriteView
|
||||
geometry.size.height: 100%
|
||||
- id: presets
|
||||
|
||||
Reference in New Issue
Block a user