From 190b367964e100c4ecde8b95d00307c4822be76e Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Fri, 1 Apr 2016 00:08:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A5=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Applications/TurretControl/TurretControl.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Applications/TurretControl/TurretControl.lua b/Applications/TurretControl/TurretControl.lua index 6e94052c..ce7869ae 100644 --- a/Applications/TurretControl/TurretControl.lua +++ b/Applications/TurretControl/TurretControl.lua @@ -158,6 +158,8 @@ local function drawBottomBar() x = drawButtonWithState(x, y, widthOfButton, 3, "Атака нейтралов", turretConfig.attacksNeutrals) newObj("BottomButtons", "AttacksPlayers", x, y, x + widthOfButton - 1, y + 2) x = drawButtonWithState(x, y, widthOfButton, 3, "Атака игроков", turretConfig.attacksPlayers) + newObj("BottomButtons", "Exit", x, y, x + widthOfButton - 1, y + 2) + x = drawButtonWithState(x, y, widthOfButton, 3, "Выход", true) end local function drawAll() @@ -231,6 +233,10 @@ while true do elseif key == "AddPlayer" then local data = ecs.universalWindow("auto", "auto", 30, 0x1e1e1e, true, {"EmptyLine"}, {"CenterText", ecs.colors.orange, "Добавить игрока"}, {"EmptyLine"}, {"Input", 0xFFFFFF, ecs.colors.orange, "Никнейм"}, {"EmptyLine"}, {"Button", {ecs.colors.orange, 0xffffff, "OK"}, {0x999999, 0xffffff, "Отмена"}} ) if data[2] == "OK" then for i = 1, #turrets do turrets[i].proxy.addTrustedPlayer(data[1]) end end + elseif key == "Exit" then + buffer.clear(0x262626) + ecs.prepareToExit() + return end break