diff --git a/gui/translation/project.godot b/gui/translation/project.godot index 37352fbcbf4..d611f8951a7 100644 --- a/gui/translation/project.godot +++ b/gui/translation/project.godot @@ -13,10 +13,10 @@ config_version=5 config/name="Translation Demo" config/description="A demo showing how Godot seamlessly enables the use of localized resources and texts." +config/tags=PackedStringArray("demo", "internationalization", "official") run/main_scene="res://translation_demo.tscn" +config/features=PackedStringArray("4.2") config/icon="res://icon.webp" -config/features=PackedStringArray("4.0") -config/tags=PackedStringArray("demo", "internationalization", "official") [display] @@ -25,11 +25,11 @@ window/stretch/aspect="expand" [internationalization] -locale/translations=PackedStringArray("res://text.en.translation", "res://text.es.translation", "res://text.ja.translation") locale/translation_remaps={ "res://flag_uk.png": PackedStringArray("res://flag_spain.png:es", "res://flag_japan.png:ja"), "res://hello_en.wav": PackedStringArray("res://hello_es.wav:es", "res://hello_jp.wav:ja") } +locale/translations=PackedStringArray("res://text.en.translation", "res://text.es.translation", "res://text.ja.translation") locale/locale_filter_mode=0 [locale] diff --git a/gui/translation/translation_demo.tscn b/gui/translation/translation_demo.tscn index e786989abbf..750e16434e9 100644 --- a/gui/translation/translation_demo.tscn +++ b/gui/translation/translation_demo.tscn @@ -1,12 +1,13 @@ -[gd_scene load_steps=6 format=3 uid="uid://7bhrbgdbrped"] +[gd_scene load_steps=5 format=3 uid="uid://7bhrbgdbrped"] [ext_resource type="Script" path="res://translation_demo.gd" id="1"] -[ext_resource type="Font" path="res://font/droid_sans.tres" id="2_fnagj"] [ext_resource type="Texture2D" uid="uid://bbdxdamxifokx" path="res://speaker.png" id="3"] [ext_resource type="Texture2D" uid="uid://cxbco5txqcf40" path="res://flag_uk.png" id="4"] [ext_resource type="AudioStream" uid="uid://d3e12qtu6rlb6" path="res://hello_en.wav" id="5"] [node name="TranslationDemo" type="Control"] +layout_mode = 3 +anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -17,9 +18,10 @@ offset_right = 512.0 offset_bottom = 300.0 size_flags_horizontal = 2 size_flags_vertical = 2 -script = ExtResource( "1" ) +script = ExtResource("1") [node name="English" type="Button" parent="."] +layout_mode = 0 offset_left = 32.0 offset_top = 64.0 offset_right = 192.0 @@ -29,6 +31,7 @@ size_flags_vertical = 2 text = "Use English" [node name="Spanish" type="Button" parent="."] +layout_mode = 0 offset_left = 32.0 offset_top = 112.0 offset_right = 192.0 @@ -38,6 +41,7 @@ size_flags_vertical = 2 text = "Use Spanish" [node name="Japanese" type="Button" parent="."] +layout_mode = 0 offset_left = 32.0 offset_top = 160.0 offset_right = 192.0 @@ -47,6 +51,7 @@ size_flags_vertical = 2 text = "Use Japanese" [node name="Description" type="Label" parent="."] +layout_mode = 0 offset_left = 243.0 offset_top = 42.0 offset_right = 804.0 @@ -64,40 +69,43 @@ modified. Resources can also be set internationalized alternatives and replaced automatically on locale change." [node name="HSeparator" type="HSeparator" parent="."] +layout_mode = 0 offset_left = 33.0 offset_top = 330.0 offset_right = 1001.0 offset_bottom = 370.0 [node name="HelloText" type="Label" parent="."] +layout_mode = 0 offset_left = 246.0 offset_top = 381.0 offset_right = 324.0 offset_bottom = 400.0 size_flags_vertical = 0 -theme_override_fonts/font = ExtResource( "2_fnagj" ) text = "KEY_HELLO" [node name="PlayAudio" type="Button" parent="."] +layout_mode = 0 offset_left = 243.0 offset_top = 442.0 offset_right = 475.0 offset_bottom = 467.0 -theme_override_fonts/font = ExtResource( "2_fnagj" ) text = "KEY_PUSH" -icon = ExtResource( "3" ) +icon = ExtResource("3") [node name="Flag" type="TextureRect" parent="."] +layout_mode = 0 offset_left = 85.0 offset_top = 382.0 offset_right = 213.0 offset_bottom = 467.0 -texture = ExtResource( "4" ) +texture = ExtResource("4") [node name="Audio" type="AudioStreamPlayer" parent="."] -stream = ExtResource( "5" ) +stream = ExtResource("5") [node name="TextLabel" type="Label" parent="."] +layout_mode = 0 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -108,13 +116,8 @@ offset_right = 487.0 offset_bottom = 255.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_fonts/font = ExtResource( "2_fnagj" ) text = "This text is being translated through script: " -__meta__ = { -"_edit_layout_mode": 1, -"_edit_use_custom_anchors": false -} [connection signal="pressed" from="English" to="." method="_on_english_pressed"] [connection signal="pressed" from="Spanish" to="." method="_on_spanish_pressed"] diff --git a/gui/ui_mirroring/fonts/NotoNaskhArabic-Bold.ttf.import b/gui/ui_mirroring/fonts/NotoNaskhArabic-Bold.ttf.import index af5241f1d8d..10692f59ecb 100644 --- a/gui/ui_mirroring/fonts/NotoNaskhArabic-Bold.ttf.import +++ b/gui/ui_mirroring/fonts/NotoNaskhArabic-Bold.ttf.import @@ -1,8 +1,8 @@ [remap] importer="font_data_dynamic" -type="FontData" -uid="uid://cppw66bb3hcnx" +type="FontFile" +uid="uid://yxqbej5m8dyf" path="res://.godot/imported/NotoNaskhArabic-Bold.ttf-b67ac52f5189efb58090e60209f82666.fontdata" [deps] @@ -12,17 +12,22 @@ dest_files=["res://.godot/imported/NotoNaskhArabic-Bold.ttf-b67ac52f5189efb58090 [params] -antialiased=true +Rendering=null +antialiasing=1 +generate_mipmaps=false multichannel_signed_distance_field=false -msdf_pixel_range=8.0 +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true force_autohinter=false hinting=1 +subpixel_positioning=1 oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null compress=true -preload/char_ranges=PackedStringArray() -preload/glyph_ranges=PackedStringArray() -preload/configurations=PackedStringArray() -support_overrides/language_enabled=PackedStringArray() -support_overrides/language_disabled=PackedStringArray() -support_overrides/script_enabled=PackedStringArray() -support_overrides/script_disabled=PackedStringArray() +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/gui/ui_mirroring/fonts/NotoSans-Bold.ttf.import b/gui/ui_mirroring/fonts/NotoSans-Bold.ttf.import index 830897e2a67..46ce3144fc1 100644 --- a/gui/ui_mirroring/fonts/NotoSans-Bold.ttf.import +++ b/gui/ui_mirroring/fonts/NotoSans-Bold.ttf.import @@ -1,8 +1,8 @@ [remap] importer="font_data_dynamic" -type="FontData" -uid="uid://gfhw2u2k16h" +type="FontFile" +uid="uid://dfamk7vwd87dx" path="res://.godot/imported/NotoSans-Bold.ttf-8ff3d9f1cfda88e84d6afd9724b2bba7.fontdata" [deps] @@ -12,17 +12,22 @@ dest_files=["res://.godot/imported/NotoSans-Bold.ttf-8ff3d9f1cfda88e84d6afd9724b [params] -antialiased=true +Rendering=null +antialiasing=1 +generate_mipmaps=false multichannel_signed_distance_field=false -msdf_pixel_range=8.0 +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true force_autohinter=false hinting=1 +subpixel_positioning=1 oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null compress=true -preload/char_ranges=PackedStringArray() -preload/glyph_ranges=PackedStringArray() -preload/configurations=PackedStringArray() -support_overrides/language_enabled=PackedStringArray() -support_overrides/language_disabled=PackedStringArray() -support_overrides/script_enabled=PackedStringArray() -support_overrides/script_disabled=PackedStringArray() +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/gui/ui_mirroring/fonts/noto_font.res b/gui/ui_mirroring/fonts/noto_font.res new file mode 100644 index 00000000000..1a14fdb8cb0 Binary files /dev/null and b/gui/ui_mirroring/fonts/noto_font.res differ diff --git a/gui/ui_mirroring/fonts/noto_font_arabic.res b/gui/ui_mirroring/fonts/noto_font_arabic.res new file mode 100644 index 00000000000..d717f9602e5 Binary files /dev/null and b/gui/ui_mirroring/fonts/noto_font_arabic.res differ diff --git a/gui/ui_mirroring/noto_font.tres b/gui/ui_mirroring/noto_font.tres deleted file mode 100644 index cbceef6282a..00000000000 --- a/gui/ui_mirroring/noto_font.tres +++ /dev/null @@ -1,8 +0,0 @@ -[gd_resource type="Font" load_steps=3 format=2] - -[ext_resource path="res://fonts/NotoSans-Bold.ttf" type="FontData" id=1] -[ext_resource path="res://fonts/NotoNaskhArabic-Bold.ttf" type="FontData" id=2] - -[resource] -data/0 = ExtResource( 1 ) -data/1 = ExtResource( 2 ) diff --git a/gui/ui_mirroring/project.godot b/gui/ui_mirroring/project.godot index 2881dc8fadd..f21416719f8 100644 --- a/gui/ui_mirroring/project.godot +++ b/gui/ui_mirroring/project.godot @@ -6,11 +6,16 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=4 +config_version=5 [application] config/name="UI Mirroring Demo" +config/tags=PackedStringArray("demo", "gui", "internationalization", "official") run/main_scene="res://ui_mirroring.tscn" +config/features=PackedStringArray("4.2") config/icon="res://icon.webp" -config/tags=PackedStringArray("demo", "gui", "internationalization", "official") + +[internationalization] + +locale/translations=PackedStringArray("res://translation.en.translation", "res://translation.ar.translation", "res://translation.es.translation", "res://translation.ja.translation") diff --git a/gui/ui_mirroring/screenshots/ui_mirroring_ar.png b/gui/ui_mirroring/screenshots/ui_mirroring_ar.png index f631b8d67fc..1e9632113c8 100644 Binary files a/gui/ui_mirroring/screenshots/ui_mirroring_ar.png and b/gui/ui_mirroring/screenshots/ui_mirroring_ar.png differ diff --git a/gui/ui_mirroring/screenshots/ui_mirroring_ar.png.import b/gui/ui_mirroring/screenshots/ui_mirroring_ar.png.import index 157742074c3..1533937a0b9 100644 --- a/gui/ui_mirroring/screenshots/ui_mirroring_ar.png.import +++ b/gui/ui_mirroring/screenshots/ui_mirroring_ar.png.import @@ -1,9 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" +type="CompressedTexture2D" uid="uid://bk7vjwlmxebjj" -path="res://.godot/imported/ui_mirroring_ar.png-0ac3776471fa54847d7107e345a38530.stex" +path="res://.godot/imported/ui_mirroring_ar.png-0ac3776471fa54847d7107e345a38530.ctex" metadata={ "vram_texture": false } @@ -11,17 +11,16 @@ metadata={ [deps] source_file="res://screenshots/ui_mirroring_ar.png" -dest_files=["res://.godot/imported/ui_mirroring_ar.png-0ac3776471fa54847d7107e345a38530.stex"] +dest_files=["res://.godot/imported/ui_mirroring_ar.png-0ac3776471fa54847d7107e345a38530.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 -compress/streamed=false mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 @@ -29,7 +28,7 @@ roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false -process/HDR_as_SRGB=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=1.0 diff --git a/gui/ui_mirroring/screenshots/ui_mirroring_en.png b/gui/ui_mirroring/screenshots/ui_mirroring_en.png index c7544abf655..c3dd284cb69 100644 Binary files a/gui/ui_mirroring/screenshots/ui_mirroring_en.png and b/gui/ui_mirroring/screenshots/ui_mirroring_en.png differ diff --git a/gui/ui_mirroring/screenshots/ui_mirroring_en.png.import b/gui/ui_mirroring/screenshots/ui_mirroring_en.png.import index 940df1114cb..a69649e27be 100644 --- a/gui/ui_mirroring/screenshots/ui_mirroring_en.png.import +++ b/gui/ui_mirroring/screenshots/ui_mirroring_en.png.import @@ -1,9 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" +type="CompressedTexture2D" uid="uid://kmiwt21qccaq" -path="res://.godot/imported/ui_mirroring_en.png-2424f2dd8e09af8f321757ff70ce6185.stex" +path="res://.godot/imported/ui_mirroring_en.png-2424f2dd8e09af8f321757ff70ce6185.ctex" metadata={ "vram_texture": false } @@ -11,17 +11,16 @@ metadata={ [deps] source_file="res://screenshots/ui_mirroring_en.png" -dest_files=["res://.godot/imported/ui_mirroring_en.png-2424f2dd8e09af8f321757ff70ce6185.stex"] +dest_files=["res://.godot/imported/ui_mirroring_en.png-2424f2dd8e09af8f321757ff70ce6185.ctex"] [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 -compress/streamed=false mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 @@ -29,7 +28,7 @@ roughness/src_normal="" process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false -process/HDR_as_SRGB=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=1.0 diff --git a/gui/ui_mirroring/translation.csv b/gui/ui_mirroring/translation.csv new file mode 100644 index 00000000000..7d62f7ef75f --- /dev/null +++ b/gui/ui_mirroring/translation.csv @@ -0,0 +1,2 @@ +KEYS,en,ar,es,ja +KEY_HELLO,Hello!,مرحبًا!,Hola!,こんにちは diff --git a/gui/ui_mirroring/translation.csv.import b/gui/ui_mirroring/translation.csv.import new file mode 100644 index 00000000000..00eebfb9c4e --- /dev/null +++ b/gui/ui_mirroring/translation.csv.import @@ -0,0 +1,17 @@ +[remap] + +importer="csv_translation" +type="Translation" +uid="uid://c1b0wcdgre0b4" + +[deps] + +files=["res://translation.en.translation", "res://translation.ar.translation", "res://translation.es.translation", "res://translation.ja.translation"] + +source_file="res://translation.csv" +dest_files=["res://translation.en.translation", "res://translation.ar.translation", "res://translation.es.translation", "res://translation.ja.translation"] + +[params] + +compress=true +delimiter=0 diff --git a/gui/ui_mirroring/ui_mirroring.tscn b/gui/ui_mirroring/ui_mirroring.tscn index d84286a1931..1e5d1dc4d44 100644 --- a/gui/ui_mirroring/ui_mirroring.tscn +++ b/gui/ui_mirroring/ui_mirroring.tscn @@ -1,381 +1,308 @@ -[gd_scene load_steps=3 format=3 uid="uid://c20r173idr1eu"] +[gd_scene load_steps=4 format=3 uid="uid://c20r173idr1eu"] -[ext_resource type="Font" path="res://noto_font.tres" id="1"] +[ext_resource type="FontFile" uid="uid://du2p0cagt38a5" path="res://fonts/noto_font.res" id="1_iinxd"] +[ext_resource type="FontFile" uid="uid://bsgmdgqhjnq5h" path="res://fonts/noto_font_arabic.res" id="2_gwf47"] [sub_resource type="GDScript" id="1"] script/source = "extends Control + +# Returns an array of all loaded locales of the project. +# Project -> Project Settings -> Localization +@onready var locales = TranslationServer.get_loaded_locales() + + func _ready(): - $Label.text = TranslationServer.get_locale() - -func _on_Button_pressed(): - if TranslationServer.get_locale() != \"ar\": - TranslationServer.set_locale(\"ar\") - else: - TranslationServer.set_locale(\"en\") - $Label.text = TranslationServer.get_locale() + for locale in locales: + var name = TranslationServer.get_locale_name(locale) + var item = \"%s (%s)\" % [name, locale] + $LocaleOptionButton.add_item(item) + + +func _on_locale_option_button_item_selected(index): + var locale = locales[index] + TranslationServer.set_locale(locale) " [node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -script = SubResource( "1" ) -__meta__ = { -"_edit_use_anchors_": false -} +grow_horizontal = 2 +grow_vertical = 2 +script = SubResource("1") [node name="PanelLTR" type="Panel" parent="."] self_modulate = Color(0.494118, 1, 0.737255, 1) +layout_direction = 2 +layout_mode = 0 anchor_top = 1.0 anchor_bottom = 1.0 offset_left = 35.0 offset_top = -200.0 offset_right = 275.0 offset_bottom = -50.0 -layout_direction = 2 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="GridContainer" type="GridContainer" parent="PanelLTR"] +layout_mode = 0 offset_right = 40.0 offset_bottom = 40.0 columns = 3 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="ButtonNW" type="Button" parent="PanelLTR/GridContainer"] -offset_right = 77.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "NorthWest" -script = null [node name="ButtonN" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 81.0 -offset_right = 128.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "North" -script = null [node name="ButtonNE" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 132.0 -offset_right = 204.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "NorthEast" -script = null [node name="ButtonW" type="Button" parent="PanelLTR/GridContainer"] -offset_top = 31.0 -offset_right = 77.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "West" -script = null [node name="ButtonCenter" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 81.0 -offset_top = 31.0 -offset_right = 128.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "*" -script = null [node name="ButtonE" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 132.0 -offset_top = 31.0 -offset_right = 204.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Еast" -script = null [node name="ButtonSW" type="Button" parent="PanelLTR/GridContainer"] -offset_top = 62.0 -offset_right = 77.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "SouthWest" -script = null [node name="ButtonS" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 81.0 -offset_top = 62.0 -offset_right = 128.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "South" -script = null [node name="ButtonSE" type="Button" parent="PanelLTR/GridContainer"] -offset_left = 132.0 -offset_top = 62.0 -offset_right = 204.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "SouthEast" -script = null [node name="PanelLocale" type="Panel" parent="PanelLTR"] self_modulate = Color(0.819608, 0.254902, 0.254902, 1) +layout_direction = 1 +layout_mode = 0 offset_left = 20.0 offset_top = 90.0 offset_right = 170.0 offset_bottom = 130.0 -layout_direction = 1 -script = null [node name="HBoxContainer" type="HBoxContainer" parent="PanelLTR/PanelLocale"] +layout_mode = 0 offset_right = 107.0 offset_bottom = 34.0005 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="ButtonPrev" type="Button" parent="PanelLTR/PanelLocale/HBoxContainer"] -offset_right = 64.0 -offset_bottom = 34.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Previous" -script = null [node name="ButtonNext" type="Button" parent="PanelLTR/PanelLocale/HBoxContainer"] -offset_left = 68.0 -offset_right = 109.0 -offset_bottom = 34.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Next" -script = null [node name="PanelRTL" type="Panel" parent="."] self_modulate = Color(0.0705882, 0.235294, 1, 1) +layout_direction = 3 +layout_mode = 0 anchor_top = 1.0 anchor_bottom = 1.0 offset_left = 33.9999 offset_top = -200.0 offset_right = 284.0 offset_bottom = -50.0 -layout_direction = 3 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="GridContainer" type="GridContainer" parent="PanelRTL"] +layout_mode = 0 offset_right = 40.0 offset_bottom = 40.0 columns = 3 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="ButtonNW" type="Button" parent="PanelRTL/GridContainer"] -offset_right = 81.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الشمال الشرقي" -script = null [node name="ButtonN" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 85.0 -offset_right = 131.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الشمال" -script = null [node name="ButtonNE" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 135.0 -offset_right = 214.0 -offset_bottom = 27.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الشمال الغربي" -script = null [node name="ButtonW" type="Button" parent="PanelRTL/GridContainer"] -offset_top = 31.0 -offset_right = 81.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الشرق" -script = null [node name="ButtonCenter" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 85.0 -offset_top = 31.0 -offset_right = 131.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "*" -script = null [node name="ButtonE" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 135.0 -offset_top = 31.0 -offset_right = 214.0 -offset_bottom = 58.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الغرب" -script = null [node name="ButtonSW" type="Button" parent="PanelRTL/GridContainer"] -offset_top = 62.0 -offset_right = 81.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الجنوب الشرقي" -script = null [node name="ButtonS" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 85.0 -offset_top = 62.0 -offset_right = 131.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = "الجنوب" -script = null [node name="ButtonSE" type="Button" parent="PanelRTL/GridContainer"] -offset_left = 135.0 -offset_top = 62.0 -offset_right = 214.0 -offset_bottom = 89.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_gwf47") theme_override_font_sizes/font_size = 12 text = " الجنوب الغربي" -script = null - -[node name="ButtonSwapLocale" type="Button" parent="."] -offset_left = 670.0 -offset_top = 25.0 -offset_right = 820.0 -offset_bottom = 65.0 -theme_override_fonts/font = ExtResource( "1" ) -theme_override_font_sizes/font_size = 12 -text = "Swap locale" -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="PanelSide" type="Panel" parent="."] +layout_mode = 0 anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = -20.0 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 0 offset_left = 20.0 offset_top = 20.0 offset_right = 140.0 offset_bottom = 60.0 -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="ButtonBack" type="Button" parent="HBoxContainer"] -offset_right = 40.0 -offset_bottom = 40.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Back" -script = null [node name="ButtonFwd" type="Button" parent="HBoxContainer"] -offset_left = 44.0 -offset_right = 105.0 -offset_bottom = 40.0 -theme_override_fonts/font = ExtResource( "1" ) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Forward" -script = null - -[node name="Label" type="Label" parent="."] -offset_left = 670.0 -offset_top = 70.0 -offset_right = 820.0 -offset_bottom = 100.0 -theme_override_fonts/font = ExtResource( "1" ) + +[node name="LocaleLabel" type="Label" parent="."] +layout_mode = 1 +offset_left = 624.0 +offset_top = 24.0 +offset_right = 664.0 +offset_bottom = 54.0 +theme_override_fonts/font = ExtResource("1_iinxd") +theme_override_font_sizes/font_size = 12 +text = "Locale" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LocaleSepLabel" type="Label" parent="."] +layout_mode = 1 +offset_left = 664.0 +offset_top = 24.0 +offset_right = 672.0 +offset_bottom = 54.0 +theme_override_fonts/font = ExtResource("1_iinxd") +theme_override_font_sizes/font_size = 12 +text = ":" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LocaleOptionButton" type="OptionButton" parent="."] +layout_mode = 0 +offset_left = 672.0 +offset_top = 24.0 +offset_right = 818.0 +offset_bottom = 54.0 +theme_override_fonts/font = ExtResource("1_iinxd") +alignment = 1 + +[node name="HelloLabel" type="Label" parent="."] +layout_mode = 0 +offset_left = 672.0 +offset_top = 64.0 +offset_right = 822.0 +offset_bottom = 94.0 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 -align = 1 -structured_text_bidi_override_options = [] -script = null -__meta__ = { -"_edit_use_anchors_": false -} +text = "KEY_HELLO" [node name="LabelInfo" type="Label" parent="."] +layout_mode = 0 offset_left = 100.0 offset_top = 100.0 -offset_right = 550.0 -offset_bottom = 300.0 -theme_override_fonts/font = ExtResource( "1" ) +offset_right = 512.0 +offset_bottom = 237.0 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 -text = "Click \"Swap Locale\" button to swap locale between \"en and \"ar\". +text = "Select a locale from the dropdown menu to swap between + \"en\" (English), \"ar\" (Arabic), \"es\" (Spanish), and \"ja\" (Japanese). Green tinted controls - LTR layout direction. Blue tinted controls - RTL layout direction. Red tinted controls - Layout direction from locale. Gray (default) controls - Inherited layout direction." -structured_text_bidi_override_options = [] -script = null -__meta__ = { -"_edit_use_anchors_": false -} [node name="OptionButton" type="OptionButton" parent="."] +layout_mode = 0 offset_left = 129.0 -offset_top = 240.0 +offset_top = 258.0 offset_right = 264.0 -offset_bottom = 260.0 -theme_override_fonts/font = ExtResource( "1" ) +offset_bottom = 278.0 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 -items = [] -script = null [node name="CheckBox" type="CheckBox" parent="."] +layout_mode = 0 offset_left = 124.0 -offset_top = 265.0 +offset_top = 283.0 offset_right = 184.0 -offset_bottom = 290.0 -theme_override_fonts/font = ExtResource( "1" ) +offset_bottom = 308.0 +theme_override_fonts/font = ExtResource("1_iinxd") theme_override_font_sizes/font_size = 12 text = "Test" -script = null -__meta__ = { -"_edit_use_anchors_": false -} -[connection signal="pressed" from="ButtonSwapLocale" to="." method="_on_Button_pressed"] +[connection signal="item_selected" from="LocaleOptionButton" to="." method="_on_locale_option_button_item_selected"]