Explorar o código

Editor: automatic creating language list

Ivan K %!s(int64=10) %!d(string=hai) anos
pai
achega
345954d5aa

+ 9 - 0
bin/Data/Scripts/Editor/EditorPreferences.as

@@ -45,6 +45,15 @@ void CreateEditorPreferencesDialog()
     preferencesDialog.height = 440;
     preferencesDialog.height = 440;
     CenterDialog(preferencesDialog);
     CenterDialog(preferencesDialog);
 
 
+    DropDownList@ languageSelector = preferencesDialog.GetChild("LanguageSelector", true);
+    for (int i = 0; i < localization.numLanguages; i++)
+    {
+        Text@ choice = Text();
+        languageSelector.AddItem(choice);
+        choice.style = "FileSelectorFilterText";
+        choice.text = localization.GetLanguage(i);
+    }
+    
     nodeItemTextColorEditR = preferencesDialog.GetChild("NodeItemTextColor.r", true);
     nodeItemTextColorEditR = preferencesDialog.GetChild("NodeItemTextColor.r", true);
     nodeItemTextColorEditG = preferencesDialog.GetChild("NodeItemTextColor.g", true);
     nodeItemTextColorEditG = preferencesDialog.GetChild("NodeItemTextColor.g", true);
     nodeItemTextColorEditB = preferencesDialog.GetChild("NodeItemTextColor.b", true);
     nodeItemTextColorEditB = preferencesDialog.GetChild("NodeItemTextColor.b", true);

+ 0 - 6
bin/Data/UI/EditorPreferencesDialog.xml

@@ -40,12 +40,6 @@
                             <element type="ListView" internal="true" style="none">
                             <element type="ListView" internal="true" style="none">
                                 <element type="BorderImage" internal="true" style="none">
                                 <element type="BorderImage" internal="true" style="none">
                                     <element internal="true" style="none">
                                     <element internal="true" style="none">
-                                        <element type="Text" style="FileSelectorFilterText">
-                                            <attribute name="Text" value="en" />
-                                        </element>
-                                        <element type="Text" style="FileSelectorFilterText">
-                                            <attribute name="Text" value="ru" />
-                                        </element>
                                     </element>
                                     </element>
                                 </element>
                                 </element>
                             </element>
                             </element>