From 6d163b72dc777c6dfc62175c7af231cd62e5c2c7 Mon Sep 17 00:00:00 2001 From: ROllerozxa Date: Fri, 3 Jun 2022 21:46:37 +0200 Subject: Rework main menu confirmation dialogs (#12356) --- builtin/mainmenu/dlg_contentstore.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'builtin/mainmenu/dlg_contentstore.lua') 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) -- cgit v1.2.3