mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
Meow
This commit is contained in:
parent
38c170439e
commit
38b9ba16db
@ -83,10 +83,19 @@ local autocompleteDatabase
|
|||||||
|
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
if fs.exists(configPath) then
|
||||||
|
config = table.fromFile(configPath)
|
||||||
|
syntax.colorScheme = config.syntaxColorScheme
|
||||||
|
end
|
||||||
|
|
||||||
local mainContainer = GUI.fullScreenContainer()
|
local mainContainer = GUI.fullScreenContainer()
|
||||||
|
|
||||||
local codeView = mainContainer:addChild(GUI.codeView(1, 1, 1, 1, {""}, 1, 1, 1, {}, {}, config.highlightLuaSyntax, 2))
|
local codeView = mainContainer:addChild(GUI.codeView(1, 1, 1, 1, {""}, 1, 1, 1, {}, {}, config.highlightLuaSyntax, 2))
|
||||||
|
|
||||||
|
local function saveConfig()
|
||||||
|
table.toFile(configPath, config)
|
||||||
|
end
|
||||||
|
|
||||||
local function convertTextPositionToScreenCoordinates(symbol, line)
|
local function convertTextPositionToScreenCoordinates(symbol, line)
|
||||||
return
|
return
|
||||||
codeView.codeAreaPosition + symbol - codeView.fromSymbol + 1,
|
codeView.codeAreaPosition + symbol - codeView.fromSymbol + 1,
|
||||||
@ -155,7 +164,7 @@ local addBreakpointButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0x
|
|||||||
|
|
||||||
local syntaxHighlightingButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0xD2D2D2, 0x4B4B4B, 0x696969, 0xE1E1E1, "◌"))
|
local syntaxHighlightingButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0xD2D2D2, 0x4B4B4B, 0x696969, 0xE1E1E1, "◌"))
|
||||||
syntaxHighlightingButton.switchMode = true
|
syntaxHighlightingButton.switchMode = true
|
||||||
syntaxHighlightingButton.pressed = config.highlightLuaSyntax
|
syntaxHighlightingButton.pressed = codeView.highlightLuaSyntax
|
||||||
|
|
||||||
local runButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0x4B4B4B, 0xE1E1E1, 0xD2D2D2, 0x4B4B4B, "▷"))
|
local runButton = topLayout:addChild(GUI.adaptiveButton(1, 1, 3, 1, 0x4B4B4B, 0xE1E1E1, 0xD2D2D2, 0x4B4B4B, "▷"))
|
||||||
|
|
||||||
@ -274,19 +283,6 @@ local function tick()
|
|||||||
buffer.draw()
|
buffer.draw()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function saveConfig()
|
|
||||||
table.toFile(configPath, config)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function loadConfig()
|
|
||||||
if fs.exists(configPath) then
|
|
||||||
config = table.fromFile(configPath)
|
|
||||||
syntax.colorScheme = config.syntaxColorScheme
|
|
||||||
else
|
|
||||||
saveConfig()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function updateAutocompleteDatabaseFromString(str, value)
|
local function updateAutocompleteDatabaseFromString(str, value)
|
||||||
for word in str:gmatch("[%a%d%_]+") do
|
for word in str:gmatch("[%a%d%_]+") do
|
||||||
if not word:match("^%d+$") then
|
if not word:match("^%d+$") then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user