parent
63f508d430
commit
0fefab2cdd
@ -83,8 +83,13 @@
|
|||||||
<splitbox orientation="horizontal" split-pos="0.4">
|
<splitbox orientation="horizontal" split-pos="0.4">
|
||||||
<panel id="traceback" padding="4" color="#000000A0">
|
<panel id="traceback" padding="4" color="#000000A0">
|
||||||
</panel>
|
</panel>
|
||||||
<panel id="output" padding="4" color="#000000A0">
|
<textbox id="output"
|
||||||
</panel>
|
padding="4"
|
||||||
|
editable="false"
|
||||||
|
markup="md"
|
||||||
|
multiline="true"
|
||||||
|
color="#000000A0">
|
||||||
|
</textbox>
|
||||||
</splitbox>
|
</splitbox>
|
||||||
</splitbox>
|
</splitbox>
|
||||||
</splitbox>
|
</splitbox>
|
||||||
|
|||||||
@ -149,9 +149,9 @@ function run_current_file()
|
|||||||
clear_output()
|
clear_output()
|
||||||
if not chunk then
|
if not chunk then
|
||||||
local line, message = err:match(".*:(%d*): (.*)")
|
local line, message = err:match(".*:(%d*): (.*)")
|
||||||
document.output:add(
|
document.output:paste(
|
||||||
string.format(
|
string.format(
|
||||||
"<label color='#FF3030' enabled='false' margin='2'>%s: %s</label>",
|
"\n[#FF3030]%s: %s[#FFFFFF]",
|
||||||
gui.str("Error at line %{0}"):gsub("%%{0}", line), message)
|
gui.str("Error at line %{0}"):gsub("%%{0}", line), message)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@ -176,11 +176,7 @@ function run_current_file()
|
|||||||
}
|
}
|
||||||
func = funcs[script_type] or func
|
func = funcs[script_type] or func
|
||||||
local output = core.capture_output(function() func(unit) end)
|
local output = core.capture_output(function() func(unit) end)
|
||||||
document.output:add(
|
document.output:paste(string.format("\n%s", output))
|
||||||
string.format(
|
|
||||||
"<label enabled='false' multiline='true' margin='2'>%s</label>",
|
|
||||||
output)
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function save_current_file()
|
function save_current_file()
|
||||||
@ -220,8 +216,8 @@ end
|
|||||||
|
|
||||||
function clear_output()
|
function clear_output()
|
||||||
local output = document.output
|
local output = document.output
|
||||||
output:clear()
|
output.text = ""
|
||||||
output:add("<label enabled='false' margin='2'>@devtools.output</label>")
|
output:paste("[#FFFFFF80]"..gui.str("devtools.output").."[#FFFFFF]")
|
||||||
end
|
end
|
||||||
|
|
||||||
events.on("core:open_traceback", function(traceback_b64)
|
events.on("core:open_traceback", function(traceback_b64)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user