mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
ContentDB dialog: React to window info changes immediately (#15248)
This commit is contained in:
parent
6ac4447134
commit
07ff2a5c01
3 changed files with 24 additions and 1 deletions
|
@ -496,6 +496,11 @@ local function handle_events(event)
|
|||
return true
|
||||
end
|
||||
|
||||
if event == "WindowInfoChange" then
|
||||
ui.update()
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
|
@ -305,12 +305,23 @@ local function handle_submit(this, fields)
|
|||
end
|
||||
|
||||
|
||||
local function handle_events(event)
|
||||
if event == "WindowInfoChange" then
|
||||
ui.update()
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function create_package_dialog(package)
|
||||
assert(package)
|
||||
|
||||
local dlg = dialog_create("package_dialog_" .. package.id,
|
||||
get_formspec,
|
||||
handle_submit)
|
||||
handle_submit,
|
||||
handle_events)
|
||||
local data = dlg.data
|
||||
|
||||
data.package = package
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue