From dc164c6f3fe1a28ebcee4f0fb740eff407ec790e Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Sat, 17 Feb 2018 18:15:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B3=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D0=BA=D0=BB=D0=B8=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D0=BE=D0=BA?= =?UTF-8?q?=D0=BD=D0=B0=D0=BC=20=D0=B8=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=D0=B5=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B6=D0=B5=D0=BA=20=D0=B8=D0=B7=20=D0=BC=D0=B0=D1=80?= =?UTF-8?q?=D0=BA=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMarket/Localization/English.lang | 1 + .../AppMarket/Localization/Russian.lang | 1 + Applications/AppMarket/Main.lua | 16 +++++---------- lib/MineOSInterface.lua | 12 ++++++----- lib/doubleBuffering.lua | 20 +++++++++---------- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Applications/AppMarket/Localization/English.lang b/Applications/AppMarket/Localization/English.lang index 9428500d..1b6c5408 100644 --- a/Applications/AppMarket/Localization/English.lang +++ b/Applications/AppMarket/Localization/English.lang @@ -70,6 +70,7 @@ publish = "Publish software", install = "Install", installed = "Installed", + reinstall = "Reinstall", update = "Update", page = "Page", updateAll = "Update all", diff --git a/Applications/AppMarket/Localization/Russian.lang b/Applications/AppMarket/Localization/Russian.lang index d4942c12..e51ff98e 100644 --- a/Applications/AppMarket/Localization/Russian.lang +++ b/Applications/AppMarket/Localization/Russian.lang @@ -70,6 +70,7 @@ publish = "Опубликовать ПО", install = "Установить", installed = "Установлено", + reinstall = "Переустановить", update = "Обновить", page = "Страница", updateAll = "Обновить все", diff --git a/Applications/AppMarket/Main.lua b/Applications/AppMarket/Main.lua index ac42f296..923f8755 100644 --- a/Applications/AppMarket/Main.lua +++ b/Applications/AppMarket/Main.lua @@ -578,9 +578,9 @@ local function addApplicationInfo(container, publication, limit) container.downloadButton.colors.disabled.text = 0xFFFFFF container.downloadButton.disabled = updateState == 4 - if updateState == 4 then + if updateState > 2 then container.downloadButton.width = container.downloadButton.width + 1 - container:addChild(GUI.adaptiveRoundedButton(container.downloadButton.localX + container.downloadButton.width, container.downloadButton.localY, 1, 0, 0xC3C3C3, 0xFFFFFF, 0x969696, 0xFFFFFF, "x")).onTouch = function() + container:addChild(GUI.adaptiveRoundedButton(container.downloadButton.localX + container.downloadButton.width, container.downloadButton.localY, 1, 0, 0xF0F0F0, 0x969696, 0x969696, 0xFFFFFF, "x")).onTouch = function() fs.remove(getApplicationPathFromVersions(fileVersions[publication.publication_name].path)) fs.remove(MineOSPaths.desktop .. publication.publication_name .. ".lnk") fileVersions[publication.publication_name] = nil @@ -1305,8 +1305,8 @@ updateFileList = function(category_id, updates) end local backButton = navigationLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 1, 0, 0xFFFFFF, 0x696969, 0xA5A5A5, 0xFFFFFF, "<")) - backButton.colors.disabled.background = 0xD2D2D2 - backButton.colors.disabled.text = 0xB4B4B4 + backButton.colors.disabled.background = 0xE1E1E1 + backButton.colors.disabled.text = 0xC3C3C3 backButton.disabled = currentPage == 0 backButton.onTouch = function() switchPage(false) @@ -1574,10 +1574,4 @@ else lastArguments = {1} end -window:resize(window.width, window.height) - - - - - - +window:resize(window.width, window.height) \ No newline at end of file diff --git a/lib/MineOSInterface.lua b/lib/MineOSInterface.lua index 3497bb82..bce4f78c 100755 --- a/lib/MineOSInterface.lua +++ b/lib/MineOSInterface.lua @@ -1536,11 +1536,13 @@ local function windowCheck(window, x, y) end local function windowEventHandler(mainContainer, window, eventData) - if eventData[1] == "touch" and not windowCheck(window, eventData[3], eventData[4]) then - window.lastTouchPosition = { - x = eventData[3], - y = eventData[4] - } + if eventData[1] == "touch" then + if not windowCheck(window, eventData[3], eventData[4]) then + window.lastTouchPosition = { + x = eventData[3], + y = eventData[4] + } + end if window ~= window.parent.children[#window.parent.children] then window:moveToFront() diff --git a/lib/doubleBuffering.lua b/lib/doubleBuffering.lua index 0cfa84a5..d5cebd41 100755 --- a/lib/doubleBuffering.lua +++ b/lib/doubleBuffering.lua @@ -4,7 +4,7 @@ local unicode = require("unicode") local color = require("color") local image = require("image") --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local bufferWidth, bufferHeight local currentFrameBackgrounds, currentFrameForegrounds, currentFrameSymbols, newFrameBackgrounds, newFrameForegrounds, newFrameSymbols @@ -16,7 +16,7 @@ local tableInsert, tableConcat = table.insert, table.concat local colorBlend = color.blend local unicodeLen, unicodeSub = unicode.len, unicode.sub --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function getCoordinates(index) local integer, fractional = mathModf(index / bufferWidth) @@ -27,7 +27,7 @@ local function getIndex(x, y) return bufferWidth * (y - 1) + x end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function setDrawLimit(x1, y1, x2, y2) drawLimitX1, drawLimitY1, drawLimitX2, drawLimitY2 = x1, y1, x2, y2 @@ -41,7 +41,7 @@ local function getDrawLimit() return drawLimitX1, drawLimitY1, drawLimitX2, drawLimitY2 end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function flush(width, height) if not width or not height then @@ -113,7 +113,7 @@ local function bindGPU(address) flush(GPUProxyGetResolution()) end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function rawSet(index, background, foreground, symbol) newFrameBackgrounds[index], newFrameForegrounds[index], newFrameSymbols[index] = background, foreground, symbol @@ -338,7 +338,7 @@ local function frame(x, y, width, height, color) text(x, y, color, stringDown) end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function semiPixelRawSet(index, color, yPercentTwoEqualsZero) local upperPixel, lowerPixel, bothPixel = "▀", "▄", " " @@ -432,7 +432,7 @@ local function semiPixelCircle(xCenter, yCenter, radius, color) if x == y then insertPoints(x, y) end end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function getPointTimedPosition(firstPoint, secondPoint, time) return { @@ -535,7 +535,7 @@ local function customImage(x, y, pixels) return (x + 1), (y + 1), (x + #pixels[1]), (y + #pixels) end --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- local function debug(...) local args = {...} @@ -641,11 +641,11 @@ local function draw(force) -- debug("os.clock() delta: " .. (os.clock() - oldClock)) end ------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- bindGPU(component.getPrimary("gpu").address) ------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- return { getCoordinates = getCoordinates,