aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklp <89982526+Niklp09@users.noreply.github.com>2023-09-13 15:45:25 +0200
committerGitHub <noreply@github.com>2023-09-13 23:45:25 +1000
commitd7d55fbb79f6d60dcf5a393826be8c9e0afdfe82 (patch)
tree8ff8f489d3fba684466fbae3c650fcffe5afc91f
parente52b742b9bd097fa5a08291e8a8b67e1af7386b9 (diff)
downloaddisplay_modpack_no_craft-d7d55fbb79f6d60dcf5a393826be8c9e0afdfe82.tar.gz
display_modpack_no_craft-d7d55fbb79f6d60dcf5a393826be8c9e0afdfe82.zip
Allow changing font of boards and remove wipe button (#5)
-rw-r--r--boards/init.lua13
-rw-r--r--boards/locale/boards.de.tr6
-rw-r--r--boards/locale/boards.fr.tr6
-rw-r--r--boards/locale/boards.ms.tr6
-rw-r--r--boards/locale/template.txt6
-rw-r--r--signs/locale/signs.de.tr12
-rw-r--r--signs/locale/signs.fr.tr12
-rw-r--r--signs/locale/signs.ms.tr12
-rw-r--r--signs/locale/template.txt12
9 files changed, 43 insertions, 42 deletions
diff --git a/boards/init.lua b/boards/init.lua
index 2e70c65..965c5bf 100644
--- a/boards/init.lua
+++ b/boards/init.lua
@@ -33,10 +33,10 @@ local function set_formspec(pos)
local meta = minetest.get_meta(pos)
local display_text = minetest.formspec_escape(meta:get_string("display_text"))
meta:set_string("formspec",
- "size[6,4]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
- "textarea[0.5,0.7;5.5,3;display_text;"..FS("Text")..";" .. display_text .. "]"..
- "button_exit[3,3.5;2,1;ok;"..FS("Write").."]"..
- "button_exit[1,3.5;2,1;wipe;"..FS("Wipe").."]")
+ "size[6,3.5]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
+ "textarea[0.55,0.25;5.5,3;display_text;"..FS("Text")..";" .. display_text .. "]"..
+ "button_exit[1,2.75;2,1;ok;"..FS("Write").."]"..
+ "button[3,2.75;2,1;font;"..FS("Font").."]")
end
-- On boards, everyone is allowed to write and wipe
@@ -45,8 +45,9 @@ local function on_receive_fields(pos, formname, fields, player)
if fields.ok or fields.key_enter then
signs_api.set_display_text(pos, fields.display_text, fields.font)
end
- if fields.wipe then
- signs_api.set_display_text(pos, "", fields.font)
+ if fields.font then
+ signs_api.set_display_text(pos, fields.display_text)
+ font_api.show_font_list(player, pos)
end
end
end
diff --git a/boards/locale/boards.de.tr b/boards/locale/boards.de.tr
index ab81fd3..a20fd50 100644
--- a/boards/locale/boards.de.tr
+++ b/boards/locale/boards.de.tr
@@ -1,6 +1,6 @@
# textdomain: boards
-Black board=Schwarze Tafel
-Green board=Grüne Tafel
Text=Text
Write=Schreiben
-Wipe=Abwischen
+Font=Schriftart
+Black board=Schwarze Tafel
+Green board=Grüne Tafel
diff --git a/boards/locale/boards.fr.tr b/boards/locale/boards.fr.tr
index dbdf908..ba22274 100644
--- a/boards/locale/boards.fr.tr
+++ b/boards/locale/boards.fr.tr
@@ -1,6 +1,6 @@
# textdomain: boards
-Black board=Tableau noir
-Green board=Tableau vert
Text=Texte
Write=Écrire
-Wipe=Effacer
+Font=Police
+Black board=Tableau noir
+Green board=Tableau vert
diff --git a/boards/locale/boards.ms.tr b/boards/locale/boards.ms.tr
index 49bdbee..4973060 100644
--- a/boards/locale/boards.ms.tr
+++ b/boards/locale/boards.ms.tr
@@ -1,6 +1,6 @@
# textdomain: boards
-Black board=Papan hitam
-Green board=
Text=
Write=
-Wipe=
+Font=
+Black board=Papan hitam
+Green board=
diff --git a/boards/locale/template.txt b/boards/locale/template.txt
index 104a8e6..0643947 100644
--- a/boards/locale/template.txt
+++ b/boards/locale/template.txt
@@ -1,6 +1,6 @@
# textdomain: boards
-Black board=
-Green board=
Text=
Write=
-Wipe=
+Font=
+Black board=
+Green board=
diff --git a/signs/locale/signs.de.tr b/signs/locale/signs.de.tr
index 10f1100..4ea4239 100644
--- a/signs/locale/signs.de.tr
+++ b/signs/locale/signs.de.tr
@@ -1,10 +1,4 @@
# textdomain: signs
-Wooden sign=Hölzernes Schild
-Wooden long sign=Langes hölzernes Schild
-Wooden direction sign=Hölzerner Wegweiser
-Poster=Poster
-Small label=Kleines Etikett
-Label=Etikett
Close=Schließen
Edit=Bearbeiten
Title=Titel
@@ -12,3 +6,9 @@ Text=Text
Title font=Titel Schriftart
Write=Schreiben
(right-click to read more text)=(Rechtsklick für mehr Text)
+Wooden sign=Hölzernes Schild
+Wooden long sign=Langes hölzernes Schild
+Wooden direction sign=Hölzerner Wegweiser
+Poster=Poster
+Small label=Kleines Etikett
+Label=Etikett
diff --git a/signs/locale/signs.fr.tr b/signs/locale/signs.fr.tr
index 54b5125..2378953 100644
--- a/signs/locale/signs.fr.tr
+++ b/signs/locale/signs.fr.tr
@@ -1,10 +1,4 @@
# textdomain: signs
-Wooden sign=Signe en bois
-Wooden long sign=Long signe en bois
-Wooden direction sign=Panneau de direction en bois
-Poster=Affiche
-Small label=Petite étiquette
-Label=Étiquette
Close=Fermer
Edit=Éditer
Title=Titre
@@ -12,3 +6,9 @@ Text=Texte
Title font=Police de titre
Write=Écrire
(right-click to read more text)=(Clic-droit pour afficher le texte entier)
+Wooden sign=Signe en bois
+Wooden long sign=Long signe en bois
+Wooden direction sign=Panneau de direction en bois
+Poster=Affiche
+Small label=Petite étiquette
+Label=Étiquette
diff --git a/signs/locale/signs.ms.tr b/signs/locale/signs.ms.tr
index 5b63ffa..272234f 100644
--- a/signs/locale/signs.ms.tr
+++ b/signs/locale/signs.ms.tr
@@ -1,10 +1,4 @@
# textdomain: signs
-Wooden sign=
-Wooden long sign=
-Wooden direction sign=Papan tanda arah kayu
-Poster=Poster
-Small label=
-Label=
Close=
Edit=
Title=
@@ -12,3 +6,9 @@ Text=
Title font=
Write=
(right-click to read more text)=(klik-kanan untuk baca teks penuh)
+Wooden sign=
+Wooden long sign=
+Wooden direction sign=Papan tanda arah kayu
+Poster=Poster
+Small label=
+Label=
diff --git a/signs/locale/template.txt b/signs/locale/template.txt
index c0ff5ec..4545092 100644
--- a/signs/locale/template.txt
+++ b/signs/locale/template.txt
@@ -1,10 +1,4 @@
# textdomain: signs
-Wooden sign=
-Wooden long sign=
-Wooden direction sign=
-Poster=
-Small label=
-Label=
Close=
Edit=
Title=
@@ -12,3 +6,9 @@ Text=
Title font=
Write=
(right-click to read more text)=
+Wooden sign=
+Wooden long sign=
+Wooden direction sign=
+Poster=
+Small label=
+Label=