diff --git a/Applications/MineCodeIDE/Main.lua b/Applications/MineCodeIDE/Main.lua index 87c4abb1..44156bc0 100755 --- a/Applications/MineCodeIDE/Main.lua +++ b/Applications/MineCodeIDE/Main.lua @@ -9,8 +9,6 @@ local buffer = require("doubleBuffering") local event = require("event") local syntax = require("syntax") local unicode = require("unicode") -local web = require("web") -local image = require("image") local keyboard = require("keyboard") local GUI = require("GUI") local MineOSPaths = require("MineOSPaths") @@ -156,7 +154,8 @@ end local addBreakpointButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0x878787, 0xE1E1E1, 0xD2D2D2, 0x4B4B4B, "x")) local syntaxHighlightingButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0xD2D2D2, 0x4B4B4B, 0x696969, 0xE1E1E1, "◌")) -syntaxHighlightingButton.switchMode, syntaxHighlightingButton.pressed = true, true +syntaxHighlightingButton.switchMode = true +syntaxHighlightingButton.pressed = config.highlightLuaSyntax local runButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0x4B4B4B, 0xE1E1E1, 0xD2D2D2, 0x4B4B4B, "▷")) @@ -830,7 +829,7 @@ local function downloadFileFromWeb() container.input.onInputFinished = function() if #container.input.text > 0 then - local result, reason = web.request(container.input.text) + local result, reason = require("web").request(container.input.text) if result then newFile() codeView.lines, codeView.maximumLineLength = splitStringIntoLines(result) diff --git a/Applications/PictureEdit/Tools/3.lua b/Applications/PictureEdit/Tools/3.lua index e8b4f39b..07e70b2b 100644 --- a/Applications/PictureEdit/Tools/3.lua +++ b/Applications/PictureEdit/Tools/3.lua @@ -74,11 +74,13 @@ tool.onSelection = function(mainContainer) mainContainer.currentToolLayout:addChild(cropButton) widthInput.onInputFinished = function() - expandButton.disabled = not widthInput.text:match("%d+") or not heightInput.text:match("%d+") + expandButton.disabled = not widthInput.text:match("^%d+$") or not heightInput.text:match("^%d+$") cropButton.disabled = expandButton.disabled mainContainer:drawOnScreen() end + heightInput.onInputFinished = widthInput.onInputFinished + widthInput.onInputFinished() expandButton.onTouch = function() local width, height = tonumber(widthInput.text), tonumber(heightInput.text) @@ -107,9 +109,6 @@ tool.onSelection = function(mainContainer) mainContainer.image.reposition() mainContainer:drawOnScreen() end - - heightInput.onInputFinished = widthInput.onInputFinished - widthInput.onInputFinished() end tool.eventHandler = function(mainContainer, object, eventData) diff --git a/Applications/PictureEdit/Tools/8.lua b/Applications/PictureEdit/Tools/8.lua index db234704..161d16c2 100644 --- a/Applications/PictureEdit/Tools/8.lua +++ b/Applications/PictureEdit/Tools/8.lua @@ -8,7 +8,6 @@ tool.shortcut = "Fl" tool.keyCode = 34 tool.about = "Fill tool allows you to automatically fill areas with selected primary color just like in Paint. Oh God, where is my RAM...?" - local function check(x, y, picture, sourceB, sourceF, sourceA, sourceS, newB, newF, newA, newS) if x >= 1 and x <= picture[1] and y >= 1 and y <= picture[2] then local currentB, currentF, currentA, currentS = image.get(picture, x, y) diff --git a/Applications/PictureEdit/Tools/9.lua b/Applications/PictureEdit/Tools/9.lua index 5116fdc7..a669e1d9 100644 --- a/Applications/PictureEdit/Tools/9.lua +++ b/Applications/PictureEdit/Tools/9.lua @@ -45,7 +45,7 @@ tool.eventHandler = function(mainContainer, object, eventData) image.set(mainContainer.image.data, x, y, backgroundSwitch.switch.state and mainContainer.secondaryColorSelector.color or background, mainContainer.primaryColorSelector.color, - alpha, + backgroundSwitch.switch.state and 0 or alpha, char )