add gui.set_syntax_styles
This commit is contained in:
@@ -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]
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user