Add style[] tag with button support
This commit is contained in:
parent
ccfc252728
commit
bdbc9d2e93
|
@ -22,6 +22,7 @@ local function delete_content_formspec(dialogdata)
|
|||
"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") .. "]"
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ local function delete_world_formspec(dialogdata)
|
|||
"size[10,2.5,true]" ..
|
||||
"label[0.5,0.5;" ..
|
||||
fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]" ..
|
||||
"style[world_delete_confirm;bgcolor;red]" ..
|
||||
"button[0.5,1.5;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" ..
|
||||
"button[7.0,1.5;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]"
|
||||
return retval
|
||||
|
|
|
@ -102,6 +102,9 @@ local function get_formspec(tabview, name, tabdata)
|
|||
)
|
||||
|
||||
retval = retval ..
|
||||
"style_type[button;bgcolor;#006699]" ..
|
||||
"style[world_delete;bgcolor;red]" ..
|
||||
"style[world_delete;textcolor;yellow]" ..
|
||||
"button[4,3.95;2.6,1;world_delete;".. fgettext("Delete") .. "]" ..
|
||||
"button[6.5,3.95;2.8,1;world_configure;".. fgettext("Configure") .. "]" ..
|
||||
"button[9.2,3.95;2.5,1;world_create;".. fgettext("New") .. "]" ..
|
||||
|
|
Loading…
Reference in New Issue