~gpcf/misc-patches

Improve formspec for posters v1 PROPOSED

ywang: 1
 Improve formspec for posters

 1 files changed, 5 insertions(+), 5 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~gpcf/misc-patches/patches/20661/mbox | git am -3
Learn more about email & git

[PATCH] Improve formspec for posters Export this patch

---
 signs/nodes.lua | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/signs/nodes.lua b/signs/nodes.lua
index 428da2e..fe79cc8 100644
--- a/signs/nodes.lua
+++ b/signs/nodes.lua
@@ -49,18 +49,18 @@ local function display_poster(pos, node, player)

	fs = string.format([=[
		size[7,9]bgcolor[#0000]
		background[0,0;7,9;signs_poster_formspec.png]
		background[0,0;7,9;signs_poster_formspec.png;true]
		image[0,-0.2;8.4,2;%s]
		style_type[textarea;textcolor=#111]
		textarea[0.3,1.5;7,8;;%s;]]=],
		titletexture,
		minetest.colorize("#111",
			minetest.formspec_escape(p_text)))
		minetest.formspec_escape(p_text))

	if minetest.is_protected(pos, player:get_player_name()) then
		fs = string.format("%sbutton_exit[2.5,8;2,1;ok;%s]", fs, F("Close"))
		fs = string.format("%sbutton_exit[2.5,8.5;2,1;ok;%s]", fs, F("Close"))
	else
		fs = string.format(
			"%sbutton[1,8;2,1;edit;%s]button_exit[4,8;2,1;ok;%s]",
			"%sbutton[1,8.5;2,1;edit;%s]button_exit[4,8.5;2,1;ok;%s]",
			fs, F("Edit"), F("Close"))
	end
	minetest.show_formspec(player:get_player_name(), fname, fs)
-- 
2.30.1