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(); }
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); } }
private static void OpenLanguageWindow() { LanguageWindow.Open(); }