Жирный рефакторинг MineCode, давно уже пора было перевести его на новые версии АПИ

This commit is contained in:
Igor Timofeev 2018-04-24 21:15:23 +03:00
parent e9973b2e5e
commit c47437e532
6 changed files with 956 additions and 955 deletions

BIN
Applications/MineCodeIDE/Icon.pic Normal file → Executable file

Binary file not shown.

View File

@ -1,4 +1,6 @@
{
arguments = "Separate arguments via comma",
launchWithArguments = "Run with arguments",
addBreakpoint = "Add breakpoint",
clearBreakpoints = "Clear breakpoints",
finishDebug = "Stop",

View File

@ -1,4 +1,6 @@
{
arguments = "Укажите аргументы через запятую",
launchWithArguments = "Запустить с аргументами",
addBreakpoint = "Точка останова",
clearBreakpoints = "Удалить точки останова",
finishDebug = "Стоп",

File diff suppressed because it is too large Load Diff

View File

@ -1081,7 +1081,7 @@ local function colorSelectorEventHandler(mainContainer, object, eventData)
if eventData[1] == "touch" then
object.pressed = true
local palette = GUI.addPaletteWindowToContainer(mainContainer)
local palette = GUI.addPaletteWindowToContainer(mainContainer, object.color)
palette.onCancel = function()
object.pressed = false
@ -3915,8 +3915,8 @@ end
-----------------------------------------------------------------------
function GUI.addPaletteWindowToContainer(parentContainer)
local palette = parentContainer:addChild(GUI.windowFromContainer(GUI.palette(1, 1, 0x9900FF)))
function GUI.addPaletteWindowToContainer(parentContainer, color)
local palette = parentContainer:addChild(GUI.windowFromContainer(GUI.palette(1, 1, color or 0x9900FF)))
palette.localX, palette.localY = math.floor(parentContainer.width / 2 - palette.width / 2), math.floor(parentContainer.height / 2 - palette.height / 2)
return palette

View File

@ -277,9 +277,9 @@ local function rasterizeEllipse(centerX, centerY, radiusX, radiusY, method)
end
end
local function line(x1, y1, x2, y2, background, foreground, alpha, symbol)
local function line(x1, y1, x2, y2, background, foreground, symbol)
rasterizeLine(x1, y1, x2, y2, function(x, y)
set(x, y, background, foreground, alpha, symbol)
set(x, y, background, foreground, symbol)
end)
end