Fix theme compliance in 0.4.x

This commit is contained in:
rubenwardy 2019-01-12 23:24:08 +00:00
parent 1c255c5c9f
commit d1b501129e
3 changed files with 13 additions and 6 deletions

View File

@ -16,5 +16,5 @@ read_globals = {
"dump", "dump",
-- Deps -- Deps
"unified_inventory", "unified_inventory", "default",
} }

View File

@ -1 +1,2 @@
unified_inventory? unified_inventory?
default?

16
gui.lua
View File

@ -1,7 +1,13 @@
selected_message_idxs = {} selected_message_idxs = {}
mail.inbox_formspec = [[ local theme
size[8,9;] if minetest.get_modpath("default") then
theme = default.gui_bg .. default.gui_bg_img
else
theme = ""
end
mail.inbox_formspec = "size[8,9;]" .. theme .. [[
button_exit[7.5,0;0.5,0.5;quit;X] button_exit[7.5,0;0.5,0.5;quit;X]
button[6,1;2,0.5;new;New Message] button[6,1;2,0.5;new;New Message]
button[6,2;2,0.5;read;Read] button[6,2;2,0.5;read;Read]
@ -27,7 +33,7 @@ function mail.show_about(name)
label[0,3;is NOT guaranteed to be private!] label[0,3;is NOT guaranteed to be private!]
label[0,3.5;Admins are able to view the messages] label[0,3.5;Admins are able to view the messages]
label[0,4;of any player.] label[0,4;of any player.]
]] ]] .. theme
minetest.show_formspec(name, "mail:about", formspec) minetest.show_formspec(name, "mail:about", formspec)
end end
@ -77,7 +83,7 @@ function mail.show_message(name, msgnumber)
button[1,5;2,1;reply;Reply] button[1,5;2,1;reply;Reply]
button[3,5;2,1;forward;Forward] button[3,5;2,1;forward;Forward]
button[5,5;2,1;delete;Delete] button[5,5;2,1;delete;Delete]
]] ]] .. theme
local sender = minetest.formspec_escape(message.sender) local sender = minetest.formspec_escape(message.sender)
local subject = minetest.formspec_escape(message.subject) local subject = minetest.formspec_escape(message.subject)
@ -95,7 +101,7 @@ function mail.show_compose(name, defaulttgt, defaultsubj, defaultbody)
button[1,7;2,1;cancel;Cancel] button[1,7;2,1;cancel;Cancel]
button[7.5,0;0.5,0.5;cancel;X] button[7.5,0;0.5,0.5;cancel;X]
button[5,7;2,1;send;Send] button[5,7;2,1;send;Send]
]] ]] .. theme
formspec = string.format(formspec, formspec = string.format(formspec,
minetest.formspec_escape(defaulttgt), minetest.formspec_escape(defaulttgt),