diff --git a/pets-gd/i18n/translations.csv b/pets-gd/i18n/translations.csv index 420910d4..381cad94 100644 --- a/pets-gd/i18n/translations.csv +++ b/pets-gd/i18n/translations.csv @@ -1,4 +1,8 @@ keys,en_US,pr,tlh_US +MAINMENU_OPTION_PLAY,Play,Set Sail,Play +MAINMENU_OPTION_OPTIONS,Options,Fiddle 'round,Options +MAINMENU_OPTION_CREDITS,Credits,Th' Crew,Credits +MAINMENU_OPTION_QUIT,Quit,Avast!,Touch Grass IZ_INTERACT_INTERACT,Interact,Interact,Interact IZ_INTERACT_CHECK,Check,Peer,Critique IZ_INTERACT_PRESS,Press,Push,Press diff --git a/pets-gd/scenes/title_screen.tscn b/pets-gd/scenes/title_screen.tscn index ffa89db8..ac93117e 100644 --- a/pets-gd/scenes/title_screen.tscn +++ b/pets-gd/scenes/title_screen.tscn @@ -254,7 +254,7 @@ tracks/7/keys = { "times": PackedFloat32Array(1.92, 3.2), "transitions": PackedFloat32Array(0.307786, 1), "update": 0, -"values": [Vector2(-400, 320), Vector2(64, 320)] +"values": [Vector2(-700, 320), Vector2(64, 320)] } [sub_resource type="Animation" id="Animation_m5j65"] @@ -354,7 +354,7 @@ tracks/7/keys = { "times": PackedFloat32Array(0, 1), "transitions": PackedFloat32Array(1, 1), "update": 0, -"values": [Vector2(64, 320), Vector2(-2400, 320)] +"values": [Vector2(64, 320), Vector2(-3000, 320)] } tracks/8/type = "value" tracks/8/imported = false @@ -574,7 +574,7 @@ offset_bottom = 360.0 [node name="Play" type="RichTextLabel" parent="MoveRight/MenuChoices"] clip_contents = false layout_mode = 0 -offset_right = 456.0 +offset_right = 720.0 offset_bottom = 136.0 focus_neighbor_top = NodePath("../Quit") focus_neighbor_bottom = NodePath("../Options") @@ -582,15 +582,15 @@ focus_next = NodePath("../Options") focus_previous = NodePath("../Quit") focus_mode = 2 theme_override_colors/default_color = Color(0.803922, 0.839216, 0.956863, 1) -theme_override_font_sizes/normal_font_size = 80 +theme_override_font_sizes/normal_font_size = 68 bbcode_enabled = true -text = "Play" +text = "MAINMENU_OPTION_PLAY" [node name="Options" type="RichTextLabel" parent="MoveRight/MenuChoices"] clip_contents = false layout_mode = 0 offset_top = 128.0 -offset_right = 456.0 +offset_right = 720.0 offset_bottom = 264.0 focus_neighbor_top = NodePath("../Play") focus_neighbor_bottom = NodePath("../Credits") @@ -598,15 +598,15 @@ focus_next = NodePath("../Credits") focus_previous = NodePath("../Play") focus_mode = 2 theme_override_colors/default_color = Color(0.803922, 0.839216, 0.956863, 1) -theme_override_font_sizes/normal_font_size = 80 +theme_override_font_sizes/normal_font_size = 68 bbcode_enabled = true -text = "Options" +text = "MAINMENU_OPTION_OPTIONS" [node name="Credits" type="RichTextLabel" parent="MoveRight/MenuChoices"] clip_contents = false layout_mode = 0 offset_top = 256.0 -offset_right = 456.0 +offset_right = 720.0 offset_bottom = 392.0 focus_neighbor_top = NodePath("../Options") focus_neighbor_bottom = NodePath("../Quit") @@ -614,15 +614,15 @@ focus_next = NodePath("../Quit") focus_previous = NodePath("../Options") focus_mode = 2 theme_override_colors/default_color = Color(0.803922, 0.839216, 0.956863, 1) -theme_override_font_sizes/normal_font_size = 80 +theme_override_font_sizes/normal_font_size = 68 bbcode_enabled = true -text = "Credits" +text = "MAINMENU_OPTION_CREDITS" [node name="Quit" type="RichTextLabel" parent="MoveRight/MenuChoices"] clip_contents = false layout_mode = 0 offset_top = 384.0 -offset_right = 456.0 +offset_right = 720.0 offset_bottom = 520.0 focus_neighbor_top = NodePath("../Credits") focus_neighbor_bottom = NodePath("../Play") @@ -630,9 +630,9 @@ focus_next = NodePath("../Play") focus_previous = NodePath("../Credits") focus_mode = 2 theme_override_colors/default_color = Color(0.803922, 0.839216, 0.956863, 1) -theme_override_font_sizes/normal_font_size = 80 +theme_override_font_sizes/normal_font_size = 68 bbcode_enabled = true -text = "Quit" +text = "MAINMENU_OPTION_QUIT" [node name="BlackFade" type="ColorRect" parent="MoveRight"] unique_name_in_owner = true diff --git a/pets-lib/src/util/choices.rs b/pets-lib/src/util/choices.rs index 21ea7aeb..c21ca2e4 100644 --- a/pets-lib/src/util/choices.rs +++ b/pets-lib/src/util/choices.rs @@ -90,7 +90,7 @@ impl ChoiceAgent { ) .unwrap(); - bbcode_toggle(label, CHOICE_WAVE_BBCODE, is_picked); + bbcode_toggle(label, CHOICE_WAVE_BBCODE, is_picked, true); } if !self.tween_property.is_empty() { diff --git a/pets-lib/src/util/node_stuff.rs b/pets-lib/src/util/node_stuff.rs index d5ee410f..17cb514c 100644 --- a/pets-lib/src/util/node_stuff.rs +++ b/pets-lib/src/util/node_stuff.rs @@ -135,9 +135,18 @@ pub fn si() -> Gd { pub struct GdW(pub Gd); /// takes a bbcode string and prepends or removes it from the label text -pub fn bbcode_toggle(mut node: Gd, bbcode: &str, active: bool) { - let old_text = node.get_text().to_string(); - let new_text = prefix_mod(&old_text, bbcode, active); +pub fn bbcode_toggle( + mut node: Gd, + bbcode: &str, + active: bool, + autotranslate: bool, +) { + let mut old_text = node.get_text(); + if autotranslate { + old_text = tr(old_text.arg()); + } + + let new_text = prefix_mod(old_text.to_string().as_str(), bbcode, active); node.set_text(&new_text); }