ui_mirroring.tscn 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. [gd_scene load_steps=3 format=3 uid="uid://c20r173idr1eu"]
  2. [ext_resource type="Font" path="res://noto_font.tres" id="1"]
  3. [sub_resource type="GDScript" id="1"]
  4. script/source = "extends Control
  5. func _ready():
  6. $Label.text = TranslationServer.get_locale()
  7. func _on_Button_pressed():
  8. if TranslationServer.get_locale() != \"ar\":
  9. TranslationServer.set_locale(\"ar\")
  10. else:
  11. TranslationServer.set_locale(\"en\")
  12. $Label.text = TranslationServer.get_locale()
  13. "
  14. [node name="Control" type="Control"]
  15. anchor_right = 1.0
  16. anchor_bottom = 1.0
  17. script = SubResource( "1" )
  18. __meta__ = {
  19. "_edit_use_anchors_": false
  20. }
  21. [node name="PanelLTR" type="Panel" parent="."]
  22. self_modulate = Color(0.494118, 1, 0.737255, 1)
  23. anchor_top = 1.0
  24. anchor_bottom = 1.0
  25. offset_left = 35.0
  26. offset_top = -200.0
  27. offset_right = 275.0
  28. offset_bottom = -50.0
  29. layout_direction = 2
  30. script = null
  31. __meta__ = {
  32. "_edit_use_anchors_": false
  33. }
  34. [node name="GridContainer" type="GridContainer" parent="PanelLTR"]
  35. offset_right = 40.0
  36. offset_bottom = 40.0
  37. columns = 3
  38. script = null
  39. __meta__ = {
  40. "_edit_use_anchors_": false
  41. }
  42. [node name="ButtonNW" type="Button" parent="PanelLTR/GridContainer"]
  43. offset_right = 77.0
  44. offset_bottom = 27.0
  45. theme_override_fonts/font = ExtResource( "1" )
  46. theme_override_font_sizes/font_size = 12
  47. text = "NorthWest"
  48. script = null
  49. [node name="ButtonN" type="Button" parent="PanelLTR/GridContainer"]
  50. offset_left = 81.0
  51. offset_right = 128.0
  52. offset_bottom = 27.0
  53. theme_override_fonts/font = ExtResource( "1" )
  54. theme_override_font_sizes/font_size = 12
  55. text = "North"
  56. script = null
  57. [node name="ButtonNE" type="Button" parent="PanelLTR/GridContainer"]
  58. offset_left = 132.0
  59. offset_right = 204.0
  60. offset_bottom = 27.0
  61. theme_override_fonts/font = ExtResource( "1" )
  62. theme_override_font_sizes/font_size = 12
  63. text = "NorthEast"
  64. script = null
  65. [node name="ButtonW" type="Button" parent="PanelLTR/GridContainer"]
  66. offset_top = 31.0
  67. offset_right = 77.0
  68. offset_bottom = 58.0
  69. theme_override_fonts/font = ExtResource( "1" )
  70. theme_override_font_sizes/font_size = 12
  71. text = "West"
  72. script = null
  73. [node name="ButtonCenter" type="Button" parent="PanelLTR/GridContainer"]
  74. offset_left = 81.0
  75. offset_top = 31.0
  76. offset_right = 128.0
  77. offset_bottom = 58.0
  78. theme_override_fonts/font = ExtResource( "1" )
  79. theme_override_font_sizes/font_size = 12
  80. text = "*"
  81. script = null
  82. [node name="ButtonE" type="Button" parent="PanelLTR/GridContainer"]
  83. offset_left = 132.0
  84. offset_top = 31.0
  85. offset_right = 204.0
  86. offset_bottom = 58.0
  87. theme_override_fonts/font = ExtResource( "1" )
  88. theme_override_font_sizes/font_size = 12
  89. text = "Еast"
  90. script = null
  91. [node name="ButtonSW" type="Button" parent="PanelLTR/GridContainer"]
  92. offset_top = 62.0
  93. offset_right = 77.0
  94. offset_bottom = 89.0
  95. theme_override_fonts/font = ExtResource( "1" )
  96. theme_override_font_sizes/font_size = 12
  97. text = "SouthWest"
  98. script = null
  99. [node name="ButtonS" type="Button" parent="PanelLTR/GridContainer"]
  100. offset_left = 81.0
  101. offset_top = 62.0
  102. offset_right = 128.0
  103. offset_bottom = 89.0
  104. theme_override_fonts/font = ExtResource( "1" )
  105. theme_override_font_sizes/font_size = 12
  106. text = "South"
  107. script = null
  108. [node name="ButtonSE" type="Button" parent="PanelLTR/GridContainer"]
  109. offset_left = 132.0
  110. offset_top = 62.0
  111. offset_right = 204.0
  112. offset_bottom = 89.0
  113. theme_override_fonts/font = ExtResource( "1" )
  114. theme_override_font_sizes/font_size = 12
  115. text = "SouthEast"
  116. script = null
  117. [node name="PanelLocale" type="Panel" parent="PanelLTR"]
  118. self_modulate = Color(0.819608, 0.254902, 0.254902, 1)
  119. offset_left = 20.0
  120. offset_top = 90.0
  121. offset_right = 170.0
  122. offset_bottom = 130.0
  123. layout_direction = 1
  124. script = null
  125. [node name="HBoxContainer" type="HBoxContainer" parent="PanelLTR/PanelLocale"]
  126. offset_right = 107.0
  127. offset_bottom = 34.0005
  128. script = null
  129. __meta__ = {
  130. "_edit_use_anchors_": false
  131. }
  132. [node name="ButtonPrev" type="Button" parent="PanelLTR/PanelLocale/HBoxContainer"]
  133. offset_right = 64.0
  134. offset_bottom = 34.0
  135. theme_override_fonts/font = ExtResource( "1" )
  136. theme_override_font_sizes/font_size = 12
  137. text = "Previous"
  138. script = null
  139. [node name="ButtonNext" type="Button" parent="PanelLTR/PanelLocale/HBoxContainer"]
  140. offset_left = 68.0
  141. offset_right = 109.0
  142. offset_bottom = 34.0
  143. theme_override_fonts/font = ExtResource( "1" )
  144. theme_override_font_sizes/font_size = 12
  145. text = "Next"
  146. script = null
  147. [node name="PanelRTL" type="Panel" parent="."]
  148. self_modulate = Color(0.0705882, 0.235294, 1, 1)
  149. anchor_top = 1.0
  150. anchor_bottom = 1.0
  151. offset_left = 33.9999
  152. offset_top = -200.0
  153. offset_right = 284.0
  154. offset_bottom = -50.0
  155. layout_direction = 3
  156. script = null
  157. __meta__ = {
  158. "_edit_use_anchors_": false
  159. }
  160. [node name="GridContainer" type="GridContainer" parent="PanelRTL"]
  161. offset_right = 40.0
  162. offset_bottom = 40.0
  163. columns = 3
  164. script = null
  165. __meta__ = {
  166. "_edit_use_anchors_": false
  167. }
  168. [node name="ButtonNW" type="Button" parent="PanelRTL/GridContainer"]
  169. offset_right = 81.0
  170. offset_bottom = 27.0
  171. theme_override_fonts/font = ExtResource( "1" )
  172. theme_override_font_sizes/font_size = 12
  173. text = "الشمال الشرقي"
  174. script = null
  175. [node name="ButtonN" type="Button" parent="PanelRTL/GridContainer"]
  176. offset_left = 85.0
  177. offset_right = 131.0
  178. offset_bottom = 27.0
  179. theme_override_fonts/font = ExtResource( "1" )
  180. theme_override_font_sizes/font_size = 12
  181. text = "الشمال"
  182. script = null
  183. [node name="ButtonNE" type="Button" parent="PanelRTL/GridContainer"]
  184. offset_left = 135.0
  185. offset_right = 214.0
  186. offset_bottom = 27.0
  187. theme_override_fonts/font = ExtResource( "1" )
  188. theme_override_font_sizes/font_size = 12
  189. text = "الشمال الغربي"
  190. script = null
  191. [node name="ButtonW" type="Button" parent="PanelRTL/GridContainer"]
  192. offset_top = 31.0
  193. offset_right = 81.0
  194. offset_bottom = 58.0
  195. theme_override_fonts/font = ExtResource( "1" )
  196. theme_override_font_sizes/font_size = 12
  197. text = "الشرق"
  198. script = null
  199. [node name="ButtonCenter" type="Button" parent="PanelRTL/GridContainer"]
  200. offset_left = 85.0
  201. offset_top = 31.0
  202. offset_right = 131.0
  203. offset_bottom = 58.0
  204. theme_override_fonts/font = ExtResource( "1" )
  205. theme_override_font_sizes/font_size = 12
  206. text = "*"
  207. script = null
  208. [node name="ButtonE" type="Button" parent="PanelRTL/GridContainer"]
  209. offset_left = 135.0
  210. offset_top = 31.0
  211. offset_right = 214.0
  212. offset_bottom = 58.0
  213. theme_override_fonts/font = ExtResource( "1" )
  214. theme_override_font_sizes/font_size = 12
  215. text = "الغرب"
  216. script = null
  217. [node name="ButtonSW" type="Button" parent="PanelRTL/GridContainer"]
  218. offset_top = 62.0
  219. offset_right = 81.0
  220. offset_bottom = 89.0
  221. theme_override_fonts/font = ExtResource( "1" )
  222. theme_override_font_sizes/font_size = 12
  223. text = "الجنوب الشرقي"
  224. script = null
  225. [node name="ButtonS" type="Button" parent="PanelRTL/GridContainer"]
  226. offset_left = 85.0
  227. offset_top = 62.0
  228. offset_right = 131.0
  229. offset_bottom = 89.0
  230. theme_override_fonts/font = ExtResource( "1" )
  231. theme_override_font_sizes/font_size = 12
  232. text = "الجنوب"
  233. script = null
  234. [node name="ButtonSE" type="Button" parent="PanelRTL/GridContainer"]
  235. offset_left = 135.0
  236. offset_top = 62.0
  237. offset_right = 214.0
  238. offset_bottom = 89.0
  239. theme_override_fonts/font = ExtResource( "1" )
  240. theme_override_font_sizes/font_size = 12
  241. text = " الجنوب الغربي"
  242. script = null
  243. [node name="ButtonSwapLocale" type="Button" parent="."]
  244. offset_left = 670.0
  245. offset_top = 25.0
  246. offset_right = 820.0
  247. offset_bottom = 65.0
  248. theme_override_fonts/font = ExtResource( "1" )
  249. theme_override_font_sizes/font_size = 12
  250. text = "Swap locale"
  251. script = null
  252. __meta__ = {
  253. "_edit_use_anchors_": false
  254. }
  255. [node name="PanelSide" type="Panel" parent="."]
  256. anchor_left = 1.0
  257. anchor_right = 1.0
  258. anchor_bottom = 1.0
  259. offset_left = -20.0
  260. script = null
  261. __meta__ = {
  262. "_edit_use_anchors_": false
  263. }
  264. [node name="HBoxContainer" type="HBoxContainer" parent="."]
  265. offset_left = 20.0
  266. offset_top = 20.0
  267. offset_right = 140.0
  268. offset_bottom = 60.0
  269. script = null
  270. __meta__ = {
  271. "_edit_use_anchors_": false
  272. }
  273. [node name="ButtonBack" type="Button" parent="HBoxContainer"]
  274. offset_right = 40.0
  275. offset_bottom = 40.0
  276. theme_override_fonts/font = ExtResource( "1" )
  277. theme_override_font_sizes/font_size = 12
  278. text = "Back"
  279. script = null
  280. [node name="ButtonFwd" type="Button" parent="HBoxContainer"]
  281. offset_left = 44.0
  282. offset_right = 105.0
  283. offset_bottom = 40.0
  284. theme_override_fonts/font = ExtResource( "1" )
  285. theme_override_font_sizes/font_size = 12
  286. text = "Forward"
  287. script = null
  288. [node name="Label" type="Label" parent="."]
  289. offset_left = 670.0
  290. offset_top = 70.0
  291. offset_right = 820.0
  292. offset_bottom = 100.0
  293. theme_override_fonts/font = ExtResource( "1" )
  294. theme_override_font_sizes/font_size = 12
  295. align = 1
  296. structured_text_bidi_override_options = []
  297. script = null
  298. __meta__ = {
  299. "_edit_use_anchors_": false
  300. }
  301. [node name="LabelInfo" type="Label" parent="."]
  302. offset_left = 100.0
  303. offset_top = 100.0
  304. offset_right = 550.0
  305. offset_bottom = 300.0
  306. theme_override_fonts/font = ExtResource( "1" )
  307. theme_override_font_sizes/font_size = 12
  308. text = "Click \"Swap Locale\" button to swap locale between \"en and \"ar\".
  309. Green tinted controls - LTR layout direction.
  310. Blue tinted controls - RTL layout direction.
  311. Red tinted controls - Layout direction from locale.
  312. Gray (default) controls - Inherited layout direction."
  313. structured_text_bidi_override_options = []
  314. script = null
  315. __meta__ = {
  316. "_edit_use_anchors_": false
  317. }
  318. [node name="OptionButton" type="OptionButton" parent="."]
  319. offset_left = 129.0
  320. offset_top = 240.0
  321. offset_right = 264.0
  322. offset_bottom = 260.0
  323. theme_override_fonts/font = ExtResource( "1" )
  324. theme_override_font_sizes/font_size = 12
  325. items = []
  326. script = null
  327. [node name="CheckBox" type="CheckBox" parent="."]
  328. offset_left = 124.0
  329. offset_top = 265.0
  330. offset_right = 184.0
  331. offset_bottom = 290.0
  332. theme_override_fonts/font = ExtResource( "1" )
  333. theme_override_font_sizes/font_size = 12
  334. text = "Test"
  335. script = null
  336. __meta__ = {
  337. "_edit_use_anchors_": false
  338. }
  339. [connection signal="pressed" from="ButtonSwapLocale" to="." method="_on_Button_pressed"]