1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-17 10:25:21 +02: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
4 changed files with 20 additions and 23 deletions

View File

@@ -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)