mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-08 04:02:40 +01:00
Вот уж мяу.
This commit is contained in:
parent
2b91ca111a
commit
ca45b89e51
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user