Mainmenu: improve the look of messagebox

This commit is contained in:
Maksim 2020-06-30 13:23:19 +02:00
parent 56455f4297
commit 8a931d30e3

View File

@ -69,13 +69,16 @@ function dialog_create(name,get_formspec,buttonhandler,eventhandler)
end end
function messagebox(name, message) function messagebox(name, message)
local bg = core.formspec_escape(defaulttexturedir .. "bg_dialog.png")
return dialog_create(name, return dialog_create(name,
function() function()
return ([[ return ([[
size[8,3] size[12,6,false]
label[0.375,0.375;%s] bgcolor[#00000000]
button[3,1.825;2,0.8;ok;%s] background[0,0;0,0;%s;true]
]]):format(message, fgettext("OK")) label[2,2;%s]
button[5,4.5;2,0.8;ok;%s]
]]):format(bg, message, fgettext("OK"))
end, end,
function(this, fields) function(this, fields)
if fields.ok then if fields.ok then