1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Rework main menu confirmation dialogs (#12356)

This commit is contained in:
ROllerozxa 2022-06-03 21:46:37 +02:00 committed by GitHub
parent b72932b445
commit 6d163b72dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 23 deletions

View file

@ -18,15 +18,10 @@
--------------------------------------------------------------------------------
local function delete_content_formspec(dialogdata)
local retval =
"size[11.5,4.5,true]" ..
"label[2,2;" ..
fgettext("Are you sure you want to delete \"$1\"?", dialogdata.content.name) .. "]"..
"style[dlg_delete_content_confirm;bgcolor=red]" ..
"button[3.25,3.5;2.5,0.5;dlg_delete_content_confirm;" .. fgettext("Delete") .. "]" ..
"button[5.75,3.5;2.5,0.5;dlg_delete_content_cancel;" .. fgettext("Cancel") .. "]"
return retval
return confirmation_formspec(
fgettext("Are you sure you want to delete \"$1\"?", dialogdata.content.name),
'dlg_delete_content_confirm', fgettext("Delete"),
'dlg_delete_content_cancel', fgettext("Cancel"))
end
--------------------------------------------------------------------------------