From 7e32fef7ba1fd356d3ad27e2c7f7b313a9d8da97 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Sun, 23 Apr 2017 00:06:46 +0300 Subject: [PATCH] aefae --- Applications.txt => Applications.cfg | 8 ++++---- Installer/installer2.lua | 14 +++++++------- MineOS/License/{English.txt => English.lang} | 0 MineOS/License/{Russian.txt => Russian.lang} | 0 lib/GUI.lua | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) rename Applications.txt => Applications.cfg (99%) rename MineOS/License/{English.txt => English.lang} (100%) rename MineOS/License/{Russian.txt => Russian.lang} (100%) diff --git a/Applications.txt b/Applications.cfg similarity index 99% rename from Applications.txt rename to Applications.cfg index fa6811d1..dd9d7de7 100644 --- a/Applications.txt +++ b/Applications.cfg @@ -62,15 +62,15 @@ version=1.0, }, { - path="/MineOS/System/OS/Languages/Russian.lang", - url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/Languages/Russian.lang", + path="/MineOS/System/OS/Localization/Russian.lang", + url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/Localization/Russian.lang", type="Script", forceDownload=true, version=1.19, }, { - path="/MineOS/System/OS/Languages/English.lang", - url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/Languages/English.lang", + path="/MineOS/System/OS/Localization/English.lang", + url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/Localization/English.lang", type="Script", forceDownload=true, version=1.20, diff --git a/Installer/installer2.lua b/Installer/installer2.lua index 909a76b6..3869ce07 100644 --- a/Installer/installer2.lua +++ b/Installer/installer2.lua @@ -48,10 +48,10 @@ end ------------------------------------------------------------------------------------------------------------------------------------ local paths = {} -paths.applicationList = "/MineOS/System/OS/Applications.txt" +paths.applicationList = "/MineOS/System/OS/Applications.cfg" local urls = {} -urls.applicationList = "https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications.txt" +urls.applicationList = "https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications.cfg" urls.installer = "https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Installer/" ------------------------------------------------------------------------------------------------------------------------------------ @@ -109,10 +109,10 @@ local function addButtonsToStage(stage) local totalWidth = (stage > 1 and buttonWidth or 0) + (stage > 1 and stage < #stages and spaceBetween or 0) + (stage < #stages and buttonWidth or 0) local x = math.floor(stageContainer.width / 2 - totalWidth / 2) + 1 - local y = stageContainer.height - 2 + local y = stageContainer.height - 3 if stage > 1 then - stageContainer.previousStageButton = stageContainer:addRoundedButton(x, y, buttonWidth, 1, 0xAAAAAA, 0xDDDDDD, 0x777777, 0xDDDDDD, "⇦") + stageContainer.previousStageButton = stageContainer:addRoundedButton(x, y, buttonWidth, 3, 0xAAAAAA, 0xDDDDDD, 0x777777, 0xDDDDDD, "⇦") stageContainer.previousStageButton.colors.disabled.background = 0xCCCCCC stageContainer.previousStageButton.colors.disabled.text = 0xDDDDDD stageContainer.previousStageButton.onTouch = function() @@ -191,7 +191,7 @@ end ------------------------------------------------------------------------------------------------------------------------------------ stages[3] = function() - local data = web.request("https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/License/" .. _G.OSSettings.language .. ".txt") + local data = web.request("https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/License/" .. _G.OSSettings.language .. ".lang") local lines = {} for line in data:gmatch("[^\n]+") do table.insert(lines, line) @@ -261,7 +261,7 @@ stages[5] = function() stageContainer.children[#stageContainer.children].localPosition.x = stageContainer.children[#stageContainer.children].localPosition.x + 3 stageContainer:addLabel(1, 22, stageContainer.width, 1, 0x666666, localization.needToReboot):setAlignment(GUI.alignment.horizontal.center, GUI.alignment.vertical.top) - stageContainer:addAdaptiveRoundedButton(math.floor(stageContainer.width / 2 - (unicode.len(localization.reboot) + 4) / 2), stageContainer.height - 3, 2, 0, 0xAAAAAA, 0xDDDDDD, 0x777777, 0xDDDDDD, localization.reboot).onTouch = function() + stageContainer:addAdaptiveRoundedButton(math.floor(stageContainer.width / 2 - (unicode.len(localization.reboot) + 4) / 2), stageContainer.height - 4, 2, 0, 0xAAAAAA, 0xDDDDDD, 0x777777, 0xDDDDDD, localization.reboot).onTouch = function() _G.OSSettings.screensaver = "Matrix" _G.OSSettings.screensaverDelay = 20 _G.OSSettings.showHelpOnApplicationStart = stageContainer.showApplicationsHelpSwitch.state @@ -272,7 +272,7 @@ stages[5] = function() } component.eeprom.set(web.request("https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/MineOS/EFI.lua")) - table.toFile("/MineOS/System/OS/Settings.cfg", _G.OSSettings) + table.toFile("/MineOS/System/OS/OSSettings.cfg", _G.OSSettings) require("computer").shutdown(true) end end diff --git a/MineOS/License/English.txt b/MineOS/License/English.lang similarity index 100% rename from MineOS/License/English.txt rename to MineOS/License/English.lang diff --git a/MineOS/License/Russian.txt b/MineOS/License/Russian.lang similarity index 100% rename from MineOS/License/Russian.txt rename to MineOS/License/Russian.lang diff --git a/lib/GUI.lua b/lib/GUI.lua index 0aca8fe6..e5d96496 100755 --- a/lib/GUI.lua +++ b/lib/GUI.lua @@ -452,9 +452,9 @@ local function drawButton(object) if object.buttonType == GUI.objectTypes.button then buffer.square(object.x, object.y, object.width, object.height, buttonColor, textColor, " ") elseif object.buttonType == GUI.objectTypes.roundedButton then - buffer.text(object.x + 1, object.y - 1, buttonColor, string.rep("▄", object.width - 2)) - buffer.square(object.x, object.y, object.width, object.height, buttonColor, textColor, " ") - buffer.text(object.x + 1, object.y + object.height, buttonColor, string.rep("▀", object.width - 2)) + buffer.text(object.x + 1, object.y, buttonColor, string.rep("▄", object.width - 2)) + buffer.square(object.x, object.y + 1, object.width, object.height - 2, buttonColor, textColor, " ") + buffer.text(object.x + 1, object.y + object.height - 1, buttonColor, string.rep("▀", object.width - 2)) else buffer.frame(object.x, object.y, object.width, object.height, buttonColor) end