Багфикс клика по окнам и более корректное удаление прожек из маркета

This commit is contained in:
Igor Timofeev 2018-02-17 18:15:54 +03:00
parent 62d44bed78
commit dc164c6f3f
5 changed files with 24 additions and 26 deletions

View File

@ -70,6 +70,7 @@
publish = "Publish software",
install = "Install",
installed = "Installed",
reinstall = "Reinstall",
update = "Update",
page = "Page",
updateAll = "Update all",

View File

@ -70,6 +70,7 @@
publish = "Опубликовать ПО",
install = "Установить",
installed = "Установлено",
reinstall = "Переустановить",
update = "Обновить",
page = "Страница",
updateAll = "Обновить все",

View File

@ -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)

View File

@ -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()

View File

@ -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,