Skip to content

Commit

Permalink
Add change font button to board formspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 committed Sep 9, 2023
1 parent e52b742 commit f417f6c
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 38 deletions.
9 changes: 7 additions & 2 deletions boards/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ local function set_formspec(pos)
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").."]")
"button_exit[0,3.5;2,1;wipe;"..FS("Wipe").."]"..
"button_exit[2,3.5;2,1;ok;"..FS("Write").."]"..
"button[4,3.5;2,1;font;"..FS("Font").."]")
end

-- On boards, everyone is allowed to write and wipe
Expand All @@ -48,6 +49,10 @@ local function on_receive_fields(pos, formname, fields, player)
if fields.wipe then
signs_api.set_display_text(pos, "", fields.font)
end
if fields.font then
signs_api.set_display_text(pos, fields.display_text)
font_api.show_font_list(player, pos)
end
end
end

Expand Down
7 changes: 4 additions & 3 deletions boards/locale/boards.de.tr
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# textdomain: boards
Black board=Schwarze Tafel
Green board=Grüne Tafel
Text=Text
Write=Schreiben
Wipe=Abwischen
Write=Schreiben
Font=Schriftart
Black board=Schwarze Tafel
Green board=Grüne Tafel
7 changes: 4 additions & 3 deletions boards/locale/boards.fr.tr
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# textdomain: boards
Black board=Tableau noir
Green board=Tableau vert
Text=Texte
Write=Écrire
Wipe=Effacer
Write=Écrire
Font=Police
Black board=Tableau noir
Green board=Tableau vert
7 changes: 4 additions & 3 deletions boards/locale/boards.ms.tr
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# textdomain: boards
Black board=Papan hitam
Green board=
Text=
Write=
Wipe=
Write=
Font=
Black board=Papan hitam
Green board=
7 changes: 4 additions & 3 deletions boards/locale/template.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# textdomain: boards
Black board=
Green board=
Text=
Write=
Wipe=
Write=
Font=
Black board=
Green board=
12 changes: 6 additions & 6 deletions signs/locale/signs.de.tr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 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
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
12 changes: 6 additions & 6 deletions signs/locale/signs.fr.tr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 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
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
12 changes: 6 additions & 6 deletions signs/locale/signs.ms.tr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# textdomain: signs
Wooden sign=
Wooden long sign=
Wooden direction sign=Papan tanda arah kayu
Poster=Poster
Small label=
Label=
Close=
Edit=
Title=
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=
12 changes: 6 additions & 6 deletions signs/locale/template.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# textdomain: signs
Wooden sign=
Wooden long sign=
Wooden direction sign=
Poster=
Small label=
Label=
Close=
Edit=
Title=
Text=
Title font=
Write=
(right-click to read more text)=
Wooden sign=
Wooden long sign=
Wooden direction sign=
Poster=
Small label=
Label=

0 comments on commit f417f6c

Please sign in to comment.