Beispiel #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PropertyField(m_languageKey, m_c_languageKey);
            serializedObject.ApplyModifiedProperties();
            //			m_target.languageKey = m_target.languageKey.Trim ();

            if (GUILayout.Button(m_c_apply, EditorStyles.miniButton, m_w50))
            {
                m_target.DisplayContent();
            }
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(new GUIContent("langeuage: " + LocalizationText.langeuage, "当前使用的语言包"), m_labelWidth);

            if (GUILayout.Button(m_c_open, EditorStyles.miniButton))
            {
                LanguageWindow.Open(m_target.languageKey.Trim());
            }

            if (GUILayout.Button(m_c_refresh, EditorStyles.miniButton))
            {
                LocalizationText.RefreshLanguage();
                m_target.DisplayContent();
            }
            EditorGUILayout.EndHorizontal();
        }
Beispiel #2
0
        public static void Open(string selelctKey)
        {
            LanguageWindow wnd = GetWindow <LanguageWindow>(true, "语言包管理");

            wnd.maxSize = MAX_SIZE;
            wnd.minSize = MIN_SIZE;

            if (selelctKey != null)
            {
                wnd.SelectByKey(selelctKey);
            }
        }
Beispiel #3
0
 private static void OpenLanguageWindow()
 {
     LanguageWindow.Open();
 }