diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 14af57e..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "args": [ - "client:flash:test" - ], - "name": "client:flash:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - }, - { - "args": [ - "client:linux:test" - ], - "name": "client:linux:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - }, - { - "args": [ - "client:html5:test" - ], - "name": "client:html5:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - }, - { - "args": [ - "client:android:test" - ], - "name": "client:android:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - }, - { - "args": [ - "editor:flash:test" - ], - "name": "editor:flash:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - }, - { - "args": [ - "server:cpp:test" - ], - "name": "server:cpp:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "type": "node" - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 18b8dcf..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "haxe.executable": { - "path": "/home/shmyga/sdk/haxe/4.2.5/haxe", - "env": { - "HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std", - }, - }, - "haxe.configurations": [ - ["build/client/flash/haxe/debug.hxml"] - ] -} \ No newline at end of file diff --git a/src/client/haxe/ru/m/tankz/AppTheme.hx b/src/client/haxe/ru/m/tankz/AppTheme.hx index 8f4ce35..9c5aad6 100644 --- a/src/client/haxe/ru/m/tankz/AppTheme.hx +++ b/src/client/haxe/ru/m/tankz/AppTheme.hx @@ -24,7 +24,7 @@ class AppTheme extends Theme { } public function new() { - super({embed: true}, COLORS, {base: "4h"}); + super({embed: true}, COLORS, {base: "2.7h", big: "4h", veryBig: "4.5h"}); } override private function reload():Void { @@ -78,9 +78,9 @@ class AppTheme extends Theme { ], ["text.box"])); register(new Style("button.level", [ - "font.size" => fontSize.veryBig, - "geometry.width" => SizeValue.fromInt(64), - "geometry.height" => SizeValue.fromInt(64), + "font.size" => fontSize.big, + "geometry.width" => SizeValue.fromString("12h"), + "geometry.height" => SizeValue.fromString("12h"), "geometry.padding" => Box.fromFloat(0), ], ["button"])); @@ -108,13 +108,13 @@ class AppTheme extends Theme { register(new Style("window.close", [ "skin" => function() return new ButtonSVGSkin(Assets.getText("resources/image/icon/window-close-solid.svg"), colors.light), - "geometry.width" => SizeValue.fromInt(36), - "geometry.height" => SizeValue.fromInt(36), + "geometry.width" => SizeValue.fromString("8h"), + "geometry.height" => SizeValue.fromString("8h"), ])); register(new Style("icon.tank", [ - "geometry.width" => SizeValue.fromInt(42), - "geometry.height" => SizeValue.fromInt(42), + "geometry.width" => SizeValue.fromString("8h"), + "geometry.height" => SizeValue.fromString("8h"), "skin.fillType" => FillType.DEFAULT, ])); @@ -165,16 +165,14 @@ class AppTheme extends Theme { } private function registerButton(name:String, resource:String, solid:Bool = false):Void { - var size = Device.isMobile() ? 64 : 42; - var smallSize = Device.isMobile() ? 42 : 32; register(new Style('button.$name', [ - "geometry.width" => SizeValue.fromInt(size), - "geometry.height" => SizeValue.fromInt(size), + "geometry.width" => SizeValue.fromString("8h"), + "geometry.height" => SizeValue.fromString("8h"), "skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid), ])); register(new Style('button.$name.small', [ - "geometry.width" => SizeValue.fromInt(smallSize), - "geometry.height" => SizeValue.fromInt(smallSize), + "geometry.width" => SizeValue.fromString("5h"), + "geometry.height" => SizeValue.fromString("5h"), "skin" => function() return new ButtonSVGSkin(Assets.getText('resources/image/icon/$resource'), colors.light, solid), ])); } diff --git a/src/client/haxe/ru/m/tankz/view/common/PackView.yaml b/src/client/haxe/ru/m/tankz/view/common/PackView.yaml index feb206e..895ee68 100644 --- a/src/client/haxe/ru/m/tankz/view/common/PackView.yaml +++ b/src/client/haxe/ru/m/tankz/view/common/PackView.yaml @@ -1,7 +1,7 @@ --- style: button.menu -geometry.width: 200 -geometry.height: 130 +geometry.width: 35h +geometry.height: 20h geometry.padding: 5 layout.hAlign: center layout.vAlign: middle @@ -10,6 +10,7 @@ content.mouseChildren: false views: - id: label $type: hw.view.form.LabelView - font.size: 22 + font.size: 4h - id: state $type: hw.view.form.LabelView + font.size: 3.5h diff --git a/src/client/haxe/ru/m/tankz/view/settings/ActionView.yaml b/src/client/haxe/ru/m/tankz/view/settings/ActionView.yaml index 0bd706b..0069d2c 100644 --- a/src/client/haxe/ru/m/tankz/view/settings/ActionView.yaml +++ b/src/client/haxe/ru/m/tankz/view/settings/ActionView.yaml @@ -3,9 +3,9 @@ layout.margin: 5 views: - id: action $type: hw.view.form.LabelView - geometry.width: 180 + geometry.width: "20w" style: text.box - id: key $type: hw.view.form.LabelView - geometry.width: 250 + geometry.width: "25w" style: text.box diff --git a/tankz.code-workspace b/tankz.code-workspace index f5ff926..88fcd73 100644 --- a/tankz.code-workspace +++ b/tankz.code-workspace @@ -11,7 +11,7 @@ "HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std" } }, - "haxe.configurations": [["build/app/flash/haxe/debug.hxml"]], + "haxe.configurations": [["build/client/flash/haxe/debug.hxml"]], "haxe.displayServer": { "arguments": [ //"-v" @@ -25,22 +25,22 @@ "version": "0.2.0", "configurations": [ { - "args": ["app:flash:test"], - "name": "app:flash:test", - "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", - "request": "launch", - "skipFiles": ["/**"], - "type": "node" - }, - { - "args": ["server:cpp:test"], - "name": "server:cpp:test", + "args": ["${input:task}"], + "name": "${input:task}", "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", "request": "launch", "skipFiles": ["/**"], "type": "node" } ], - "compounds": [] + "compounds": [], + "inputs": [ + { + "id": "task", + "description": "Please enter task name", + "options": ["client:flash:test", "server:cpp:test", "generate"], + "type": "pickString" + } + ] } }