diff options
author | ROllerozxa <temporaryemail4meh+github@gmail.com> | 2022-06-03 21:46:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 21:46:37 +0200 |
commit | 6d163b72dc777c6dfc62175c7af231cd62e5c2c7 (patch) | |
tree | f4fcf84e2dd9068af37b0a8eb4f646f30726c321 /builtin/mainmenu/dlg_delete_content.lua | |
parent | b72932b445a0d0fa547eb75e363d2e3cc1c9250a (diff) | |
download | minetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.tar.gz minetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.tar.bz2 minetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.zip |
Rework main menu confirmation dialogs (#12356)
Diffstat (limited to 'builtin/mainmenu/dlg_delete_content.lua')
-rw-r--r-- | builtin/mainmenu/dlg_delete_content.lua | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/builtin/mainmenu/dlg_delete_content.lua b/builtin/mainmenu/dlg_delete_content.lua index a24171541..4463825f7 100644 --- a/builtin/mainmenu/dlg_delete_content.lua +++ b/builtin/mainmenu/dlg_delete_content.lua @@ -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 -------------------------------------------------------------------------------- |