From d013fb4988759ebaaf57542aa2d12f67f50c093e Mon Sep 17 00:00:00 2001 From: shmyga Date: Fri, 5 Jan 2018 18:15:51 +0300 Subject: [PATCH] [client] display version --- src/client/haxe/layout/main.json | 9 +++++++++ src/client/haxe/ru/m/tankz/Client.hx | 1 + tasks/haxe.js | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/client/haxe/layout/main.json b/src/client/haxe/layout/main.json index e850cff..fcbeaca 100755 --- a/src/client/haxe/layout/main.json +++ b/src/client/haxe/layout/main.json @@ -20,6 +20,15 @@ "@type": "ru.m.tankz.view.frames.GameFrame" } ] + }, + { + "@type": "haxework.gui.LabelView", + "inLayout": false, + "contentSize": true, + "vAlign": "BOTTOM", + "hAlign": "RIGHT", + "text": "@res:text:version", + "@style": "label" } ] } \ No newline at end of file diff --git a/src/client/haxe/ru/m/tankz/Client.hx b/src/client/haxe/ru/m/tankz/Client.hx index 6ccc820..bd9d807 100755 --- a/src/client/haxe/ru/m/tankz/Client.hx +++ b/src/client/haxe/ru/m/tankz/Client.hx @@ -50,6 +50,7 @@ class Client implements IConnectionHandler { var font:Font = Font.enumerateFonts()[0]; Provider.get(IResources).text.put("font", "Bookman Old Style"); + Provider.get(IResources).text.put("version", 'v${Const.VERSION} b${Const.BUILD}'); Provider.set(IPacketBuilder, new PacketBuilder()); #if flash diff --git a/tasks/haxe.js b/tasks/haxe.js index a456234..16ebc42 100755 --- a/tasks/haxe.js +++ b/tasks/haxe.js @@ -121,7 +121,7 @@ class Haxe extends Sdk { */ openfl(params) { params = Object.assign({ - build: dateformat(new Date(), 'yyyy-mm-dd HH:MM:ss'), + build: dateformat(new Date(), 'yyyy-mm-dd HH:MM:ss'), macro: [], debug: false, }, params);