aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu/dlg_contentstore.lua
diff options
context:
space:
mode:
authorROllerozxa <temporaryemail4meh+github@gmail.com>2022-06-03 21:46:37 +0200
committerGitHub <noreply@github.com>2022-06-03 21:46:37 +0200
commit6d163b72dc777c6dfc62175c7af231cd62e5c2c7 (patch)
treef4fcf84e2dd9068af37b0a8eb4f646f30726c321 /builtin/mainmenu/dlg_contentstore.lua
parentb72932b445a0d0fa547eb75e363d2e3cc1c9250a (diff)
downloadminetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.tar.gz
minetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.tar.bz2
minetest-6d163b72dc777c6dfc62175c7af231cd62e5c2c7.zip
Rework main menu confirmation dialogs (#12356)
Diffstat (limited to 'builtin/mainmenu/dlg_contentstore.lua')
-rw-r--r--builtin/mainmenu/dlg_contentstore.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua
index 16ab1c3a7..11eaceac3 100644
--- a/builtin/mainmenu/dlg_contentstore.lua
+++ b/builtin/mainmenu/dlg_contentstore.lua
@@ -488,12 +488,10 @@ local confirm_overwrite = {}
function confirm_overwrite.get_formspec()
local package = confirm_overwrite.package
- return "size[11.5,4.5,true]" ..
- "label[2,2;" ..
- fgettext("\"$1\" already exists. Would you like to overwrite it?", package.name) .. "]"..
- "style[install;bgcolor=red]" ..
- "button[3.25,3.5;2.5,0.5;install;" .. fgettext("Overwrite") .. "]" ..
- "button[5.75,3.5;2.5,0.5;cancel;" .. fgettext("Cancel") .. "]"
+ return confirmation_formspec(
+ fgettext("\"$1\" already exists. Would you like to overwrite it?", package.name),
+ 'install', fgettext("Overwrite"),
+ 'cancel', fgettext("Cancel"))
end
function confirm_overwrite.handle_submit(this, fields)