add gui.set_syntax_styles

This commit is contained in:
MihailRis
2025-11-23 18:10:06 +03:00
parent 1676c47093
commit 50f6c48771
11 changed files with 149 additions and 43 deletions
+19
View File
@@ -0,0 +1,19 @@
[default]
bold = false
italic = false
strikethrough = false
underline = false
color = [0.8, 0.8, 0.8, 1]
[keyword]
bold = true
color = [0.9, 0.6, 0.4, 1]
[literal]
color = [0.4, 0.8, 0.5, 1]
[comment]
color = [0.5, 0.7, 1.0, 1]
[error]
color = [1.0, 0.2, 0.1, 1]
+12
View File
@@ -150,6 +150,18 @@ _MENU = _GUI_ROOT.menu
menu = _MENU
gui.root = _GUI_ROOT
do
local status, err = pcall(function()
local default_styles = toml.parse(file.read(
"res:devtools/default_syntax_scheme.toml"
))
gui.set_syntax_styles(default_styles)
end)
if not status then
debug.error("could not to load default syntax scheme: "..err)
end
end
--- Console library extension ---
console.cheats = {}