1
0
mirror of https://github.com/rubenwardy/email.git synced 2025-07-02 00:10:41 +02:00

Compare commits

1 Commits

Author SHA1 Message Date
fb80608d85 Version MFF. 2018-09-07 20:28:39 +02:00
5 changed files with 5 additions and 20 deletions

View File

@ -1,7 +1,5 @@
# Email
![screenshot](https://cdn.pbrd.co/images/8fn5I3u.png)
Created by rubenwardy.
License: WTFPL.

1
depends.txt Normal file
View File

@ -0,0 +1 @@
chatplus?

View File

@ -72,9 +72,10 @@ end)
function email.get_formspec(name)
local inbox = email.get_inbox(name)
local fs = "vertlabel[0,0;Your Inbox]"
local fs = "size[12,8]"
fs = fs .. "vertlabel[0,0;email Mail]"
function row(fs, c1, date, from, msg)
local function row(fs, c1, date, from, msg)
date = minetest.formspec_escape(date)
from = minetest.formspec_escape(from)
msg = minetest.formspec_escape(msg)
@ -126,7 +127,7 @@ function email.show_inbox(name, text_mode)
return true, "End of mail (" .. #inbox .. " items)"
end
else
local fs = "size[12,8]" .. email.get_formspec(name)
local fs = email.get_formspec(name)
minetest.show_formspec(name, "email:inbox", fs)
return true, "Opened inbox!"
@ -135,17 +136,6 @@ function email.show_inbox(name, text_mode)
return true
end
if minetest.global_exists("sfinv") then
sfinv.register_page("email:inbox", {
title = "Inbox",
get = function(self, player, context)
local name = player:get_player_name()
return sfinv.make_formspec(player, context,
email.get_formspec(name), false, "size[12,8]")
end
})
end
minetest.register_on_player_receive_fields(function(player,formname,fields)
if fields.clear then
local name = player:get_player_name()

View File

@ -1,4 +0,0 @@
name = email
title = Email
description = Adds email style inboxes to Minetest.
optional_depends = chatplus,sfinv

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 161 B