Pseudolocalization.tscn 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. [gd_scene load_steps=3 format=3 uid="uid://bcnmymjri4tt2"]
  2. [ext_resource type="Texture2D" uid="uid://brwp8bimc75uu" path="res://icon.webp" id="1"]
  3. [ext_resource type="Script" path="res://Pseudolocalization.gd" id="2"]
  4. [node name="Pseudolocalization" type="Control"]
  5. layout_mode = 3
  6. anchors_preset = 15
  7. anchor_right = 1.0
  8. anchor_bottom = 1.0
  9. script = ExtResource("2")
  10. [node name="Title" type="HBoxContainer" parent="."]
  11. layout_mode = 0
  12. anchor_right = 1.0
  13. offset_left = 20.0
  14. offset_top = 30.0
  15. offset_right = -20.0
  16. offset_bottom = 130.0
  17. grow_horizontal = 2
  18. metadata/_edit_layout_mode = 1
  19. metadata/_edit_use_custom_anchors = false
  20. [node name="TextureRect" type="TextureRect" parent="Title"]
  21. custom_minimum_size = Vector2(128, 64)
  22. layout_mode = 2
  23. texture = ExtResource("1")
  24. expand_mode = 1
  25. stretch_mode = 4
  26. [node name="Label" type="Label" parent="Title"]
  27. layout_mode = 2
  28. size_flags_horizontal = 3
  29. theme_override_font_sizes/font_size = 30
  30. text = "Pseudolocalization Demo"
  31. vertical_alignment = 1
  32. [node name="Main" type="HBoxContainer" parent="."]
  33. layout_mode = 0
  34. anchor_right = 1.0
  35. anchor_bottom = 1.0
  36. offset_left = 20.0
  37. offset_top = 150.0
  38. offset_right = -20.0
  39. grow_horizontal = 2
  40. grow_vertical = 2
  41. size_flags_vertical = 3
  42. theme_override_constants/separation = 20
  43. metadata/_edit_layout_mode = 1
  44. metadata/_edit_use_custom_anchors = false
  45. [node name="Pseudolocalization_options" type="VBoxContainer" parent="Main"]
  46. layout_direction = 2
  47. layout_mode = 2
  48. size_flags_horizontal = 3
  49. size_flags_vertical = 3
  50. [node name="toggle" type="CheckButton" parent="Main/Pseudolocalization_options"]
  51. layout_mode = 2
  52. size_flags_horizontal = 3
  53. text = "Toggle Pseudolocalization"
  54. [node name="accents" type="CheckButton" parent="Main/Pseudolocalization_options"]
  55. layout_mode = 2
  56. size_flags_horizontal = 3
  57. text = "Toggle Accents"
  58. [node name="doublevowels" type="CheckButton" parent="Main/Pseudolocalization_options"]
  59. layout_mode = 2
  60. size_flags_horizontal = 3
  61. text = "Toggle Double Vowels"
  62. [node name="fakebidi" type="CheckButton" parent="Main/Pseudolocalization_options"]
  63. layout_mode = 2
  64. size_flags_horizontal = 3
  65. text = "Toggle Fake Bidi"
  66. [node name="override" type="CheckButton" parent="Main/Pseudolocalization_options"]
  67. layout_mode = 2
  68. size_flags_horizontal = 3
  69. text = "Toggle Override"
  70. [node name="skipplaceholders" type="CheckButton" parent="Main/Pseudolocalization_options"]
  71. layout_mode = 2
  72. size_flags_horizontal = 3
  73. text = "Skip Placeholders"
  74. [node name="exp_ratio" type="HBoxContainer" parent="Main/Pseudolocalization_options"]
  75. layout_mode = 2
  76. size_flags_vertical = 0
  77. [node name="MarginContainer" type="MarginContainer" parent="Main/Pseudolocalization_options/exp_ratio"]
  78. layout_mode = 2
  79. [node name="Label" type="Label" parent="Main/Pseudolocalization_options/exp_ratio"]
  80. layout_mode = 2
  81. size_flags_horizontal = 2
  82. size_flags_vertical = 1
  83. size_flags_stretch_ratio = 4.0
  84. text = "Expansion Ratio : "
  85. [node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/exp_ratio"]
  86. layout_mode = 2
  87. size_flags_horizontal = 3
  88. caret_blink = true
  89. [node name="prefix" type="Control" parent="Main/Pseudolocalization_options"]
  90. layout_mode = 2
  91. size_flags_horizontal = 3
  92. [node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/prefix"]
  93. layout_mode = 0
  94. offset_left = 5.0
  95. offset_top = 32.8613
  96. offset_right = 385.0
  97. offset_bottom = 62.8613
  98. size_flags_horizontal = 3
  99. caret_blink = true
  100. [node name="Label" type="Label" parent="Main/Pseudolocalization_options/prefix"]
  101. layout_mode = 0
  102. offset_left = 6.0
  103. offset_top = 2.86133
  104. offset_right = 297.0
  105. offset_bottom = 28.8613
  106. text = "Pseudolocalization Prefix :"
  107. [node name="suffix" type="Control" parent="Main/Pseudolocalization_options"]
  108. layout_mode = 2
  109. size_flags_horizontal = 3
  110. [node name="TextEdit" type="LineEdit" parent="Main/Pseudolocalization_options/suffix"]
  111. layout_mode = 0
  112. offset_left = 3.811
  113. offset_top = 106.592
  114. offset_right = 383.811
  115. offset_bottom = 136.592
  116. size_flags_horizontal = 3
  117. caret_blink = true
  118. [node name="Label" type="Label" parent="Main/Pseudolocalization_options/suffix"]
  119. layout_mode = 0
  120. offset_left = 6.0
  121. offset_top = 76.5923
  122. offset_right = 297.0
  123. offset_bottom = 102.592
  124. text = "Pseudolocalization Suffix :"
  125. [node name="Pseudolocalizer" type="VBoxContainer" parent="Main"]
  126. layout_mode = 2
  127. size_flags_horizontal = 3
  128. size_flags_vertical = 3
  129. [node name="Label" type="Label" parent="Main/Pseudolocalizer"]
  130. layout_mode = 2
  131. size_flags_horizontal = 3
  132. size_flags_vertical = 5
  133. text = "Pseudolocalization key :"
  134. [node name="Key" type="TextEdit" parent="Main/Pseudolocalizer"]
  135. layout_mode = 2
  136. size_flags_horizontal = 3
  137. size_flags_vertical = 3
  138. text = "The quick brown fox jumped over the lazy dog."
  139. [node name="margin" type="MarginContainer" parent="Main/Pseudolocalizer"]
  140. layout_mode = 2
  141. size_flags_horizontal = 0
  142. size_flags_vertical = 0
  143. [node name="Pseudolocalize" type="Button" parent="Main/Pseudolocalizer"]
  144. layout_mode = 2
  145. size_flags_horizontal = 6
  146. text = "Pseudolocalize"
  147. [node name="margin2" type="MarginContainer" parent="Main/Pseudolocalizer"]
  148. layout_mode = 2
  149. size_flags_horizontal = 0
  150. size_flags_vertical = 0
  151. [node name="Label2" type="Label" parent="Main/Pseudolocalizer"]
  152. layout_mode = 2
  153. text = "Pseudolocalization result :"
  154. [node name="Result" type="TextEdit" parent="Main/Pseudolocalizer"]
  155. layout_mode = 2
  156. size_flags_horizontal = 3
  157. size_flags_vertical = 3
  158. [node name="A2Z" type="Label" parent="Main/Pseudolocalizer"]
  159. layout_mode = 2
  160. size_flags_vertical = 7
  161. text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ
  162. abcdefghijklmnopqrstuvwxyz"
  163. [node name="MarginContainer" type="MarginContainer" parent="Main"]
  164. layout_mode = 2
  165. [connection signal="toggled" from="Main/Pseudolocalization_options/toggle" to="." method="_on_toggle_toggled"]
  166. [connection signal="toggled" from="Main/Pseudolocalization_options/accents" to="." method="_on_accents_toggled"]
  167. [connection signal="toggled" from="Main/Pseudolocalization_options/doublevowels" to="." method="_on_doublevowels_toggled"]
  168. [connection signal="toggled" from="Main/Pseudolocalization_options/fakebidi" to="." method="_on_fakebidi_toggled"]
  169. [connection signal="toggled" from="Main/Pseudolocalization_options/override" to="." method="_on_override_toggled"]
  170. [connection signal="toggled" from="Main/Pseudolocalization_options/skipplaceholders" to="." method="_on_skipplaceholders_toggled"]
  171. [connection signal="text_changed" from="Main/Pseudolocalization_options/exp_ratio/TextEdit" to="." method="_on_expansion_ratio_text_changed"]
  172. [connection signal="text_changed" from="Main/Pseudolocalization_options/prefix/TextEdit" to="." method="_on_prefix_changed"]
  173. [connection signal="text_changed" from="Main/Pseudolocalization_options/suffix/TextEdit" to="." method="_on_suffix_changed"]
  174. [connection signal="pressed" from="Main/Pseudolocalizer/Pseudolocalize" to="." method="_on_Pseudolocalize_pressed"]