mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 07:21:51 +00:00
feat: reloading hud scripts
This commit is contained in:
parent
f9998f0a93
commit
6fb14ee0a4
5 changed files with 36 additions and 14 deletions
|
|
@ -173,6 +173,8 @@ function run_current_file()
|
|||
func = function() item.reload_script(unit) end
|
||||
elseif script_type == "world" then
|
||||
func = function() world.reload_script(unit) end
|
||||
elseif script_type == "hud" then
|
||||
func = function() hud.reload_script(unit) end
|
||||
end
|
||||
local output = core.capture_output(func)
|
||||
document.output:add(
|
||||
|
|
@ -392,6 +394,7 @@ local function build_scripts_classification()
|
|||
local packs = pack.get_installed()
|
||||
for _, packid in ipairs(packs) do
|
||||
scripts_classification[packid..":scripts/world.lua"] = {"world", packid}
|
||||
scripts_classification[packid..":scripts/hud.lua"] = {"hud", packid}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
"gui/module",
|
||||
"gui/play",
|
||||
"gui/info",
|
||||
"gui/world"
|
||||
"gui/world",
|
||||
"gui/hud"
|
||||
],
|
||||
"fonts": [
|
||||
{
|
||||
|
|
|
|||
BIN
res/textures/gui/hud.png
Normal file
BIN
res/textures/gui/hud.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 160 B |
Loading…
Add table
Add a link
Reference in a new issue