mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-07 07:00:31 -04:00
refactor ui components
This commit is contained in:
parent
9b2883030a
commit
1a0f0d02ff
13 changed files with 981 additions and 966 deletions
27
ui/about.lua
Normal file
27
ui/about.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
local FORMNAME = "mail:about"
|
||||
|
||||
function mail.show_about(name)
|
||||
local formspec = [[
|
||||
size[8,5;]
|
||||
button[7.25,0;0.75,0.5;back;X]
|
||||
label[0,0;Mail]
|
||||
label[0,0.5;By cheapie]
|
||||
label[0,1;http://github.com/cheapie/mail]
|
||||
label[0,1.5;See LICENSE file for license information]
|
||||
label[0,2.5;NOTE: Communication using this system]
|
||||
label[0,3;is NOT guaranteed to be private!]
|
||||
label[0,3.5;Admins are able to view the messages]
|
||||
label[0,4;of any player.]
|
||||
]] .. mail.theme
|
||||
|
||||
minetest.show_formspec(name, FORMNAME, formspec)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname)
|
||||
if formname ~= FORMNAME then
|
||||
return
|
||||
end
|
||||
|
||||
local playername = player:get_player_name()
|
||||
mail.show_mail_menu(playername)
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue