miscellaneous fixes
This commit is contained in:
parent
eca3a54b20
commit
92f226cbcf
@ -9,7 +9,9 @@ local animation_fps = 30
|
|||||||
|
|
||||||
local function remove_line(line)
|
local function remove_line(line)
|
||||||
document[line[1]]:destruct()
|
document[line[1]]:destruct()
|
||||||
time.post_runnable(function() document.root:reposition() end)
|
time.post_runnable(function()
|
||||||
|
if world.is_open() then document.root:reposition() end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function update_line(line, uptime)
|
local function update_line(line, uptime)
|
||||||
|
|||||||
@ -47,7 +47,7 @@ function gui_util.add_page_dispatcher(dispatcher)
|
|||||||
table.insert(gui_util.local_dispatchers, dispatcher)
|
table.insert(gui_util.local_dispatchers, dispatcher)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gui_util.reset_local()
|
function gui_util.__reset_local()
|
||||||
gui_util.local_dispatchers = {}
|
gui_util.local_dispatchers = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -132,5 +132,8 @@ return {
|
|||||||
end
|
end
|
||||||
return values
|
return values
|
||||||
end
|
end
|
||||||
|
end,
|
||||||
|
__reset = function()
|
||||||
|
entities = {}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@ -343,8 +343,8 @@ function __vc_on_hud_open()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
input.add_callback("key:escape", function()
|
input.add_callback("key:escape", function()
|
||||||
if hud.is_paused() then
|
if menu.page ~= "" then
|
||||||
hud.resume()
|
menu:reset()
|
||||||
elseif hud.is_inventory_open() then
|
elseif hud.is_inventory_open() then
|
||||||
hud.close_inventory()
|
hud.close_inventory()
|
||||||
else
|
else
|
||||||
@ -375,7 +375,8 @@ end
|
|||||||
|
|
||||||
function __vc_on_world_quit()
|
function __vc_on_world_quit()
|
||||||
_rules.clear()
|
_rules.clear()
|
||||||
gui_util:reset_local()
|
gui_util:__reset_local()
|
||||||
|
stdcomp.__reset()
|
||||||
end
|
end
|
||||||
|
|
||||||
local __vc_coroutines = {}
|
local __vc_coroutines = {}
|
||||||
|
|||||||
@ -117,7 +117,9 @@ void LevelScreen::initializePack(ContentPackRuntime* pack) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LevelScreen::~LevelScreen() {
|
LevelScreen::~LevelScreen() {
|
||||||
saveWorldPreview();
|
if (!controller->getLevel()->getWorld()->isNameless()) {
|
||||||
|
saveWorldPreview();
|
||||||
|
}
|
||||||
scripting::on_frontend_close();
|
scripting::on_frontend_close();
|
||||||
// unblock all bindings
|
// unblock all bindings
|
||||||
Events::enableBindings();
|
Events::enableBindings();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user