修改
This commit is contained in:
parent
d68d1a6d01
commit
4317656c64
@ -12,7 +12,7 @@ namespace AlicizaX.Editor.Extension
|
|||||||
[MainToolbarElement("EditorQuickToolBar", alignment: ToolbarAlign.Right, order: 1)]
|
[MainToolbarElement("EditorQuickToolBar", alignment: ToolbarAlign.Right, order: 1)]
|
||||||
public class EditorQuickToolBar : IMGUIContainer
|
public class EditorQuickToolBar : IMGUIContainer
|
||||||
{
|
{
|
||||||
private static GUIContent toolsDropBtContent;
|
private GUIContent toolsDropBtContent;
|
||||||
|
|
||||||
public void InitializeElement()
|
public void InitializeElement()
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@ namespace AlicizaX.Editor.Extension
|
|||||||
GUILayout.EndHorizontal();
|
GUILayout.EndHorizontal();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawEditorToolDropdownMenus()
|
void DrawEditorToolDropdownMenus()
|
||||||
{
|
{
|
||||||
GenericMenu popMenu = new GenericMenu();
|
GenericMenu popMenu = new GenericMenu();
|
||||||
for (int i = 0; i < EditorToolFunctionAttributeCollector.Attributes.Count; i++)
|
for (int i = 0; i < EditorToolFunctionAttributeCollector.Attributes.Count; i++)
|
||||||
@ -46,7 +46,7 @@ namespace AlicizaX.Editor.Extension
|
|||||||
popMenu.ShowAsContext();
|
popMenu.ShowAsContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClickToolsSubmenu(int menuIdx)
|
void ClickToolsSubmenu(int menuIdx)
|
||||||
{
|
{
|
||||||
var editorTp = EditorToolFunctionAttributeCollector.Attributes[menuIdx];
|
var editorTp = EditorToolFunctionAttributeCollector.Attributes[menuIdx];
|
||||||
if (editorTp.MethodInfo != null && editorTp.MethodInfo.IsStatic)
|
if (editorTp.MethodInfo != null && editorTp.MethodInfo.IsStatic)
|
||||||
|
|||||||
@ -11,9 +11,9 @@ using UnityEngine.UIElements;
|
|||||||
[MainToolbarElement("LocalizationDropdownField", alignment: ToolbarAlign.Right, order: 0)]
|
[MainToolbarElement("LocalizationDropdownField", alignment: ToolbarAlign.Right, order: 0)]
|
||||||
public class LocalizationDropdownField : IMGUIContainer
|
public class LocalizationDropdownField : IMGUIContainer
|
||||||
{
|
{
|
||||||
private static GUIContent appConfigBtContent;
|
private GUIContent appConfigBtContent;
|
||||||
|
|
||||||
private static string[] _languageTypeNames;
|
private string[] _languageTypeNames;
|
||||||
|
|
||||||
public void InitializeElement()
|
public void InitializeElement()
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
GUILayout.EndHorizontal();
|
GUILayout.EndHorizontal();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawEditorToolDropdownMenus()
|
void DrawEditorToolDropdownMenus()
|
||||||
{
|
{
|
||||||
string langaugeName = GetPrefsStr();
|
string langaugeName = GetPrefsStr();
|
||||||
GenericMenu popMenu = new GenericMenu();
|
GenericMenu popMenu = new GenericMenu();
|
||||||
@ -53,13 +53,13 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
popMenu.ShowAsContext();
|
popMenu.ShowAsContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClickToolsSubmenu(string langaugeName)
|
void ClickToolsSubmenu(string langaugeName)
|
||||||
{
|
{
|
||||||
EditorPrefs.SetString(LocalizationComponent.PrefsKey, langaugeName);
|
EditorPrefs.SetString(LocalizationComponent.PrefsKey, langaugeName);
|
||||||
Debug.Log(langaugeName);
|
Debug.Log(langaugeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static string GetPrefsStr()
|
string GetPrefsStr()
|
||||||
{
|
{
|
||||||
return EditorPrefs.GetString(LocalizationComponent.PrefsKey, "None");
|
return EditorPrefs.GetString(LocalizationComponent.PrefsKey, "None");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,9 +12,9 @@ namespace AlicizaX.Editor.Extension
|
|||||||
[MainToolbarElement("ResourceModeDropdownField", alignment: ToolbarAlign.Right, order: 0)]
|
[MainToolbarElement("ResourceModeDropdownField", alignment: ToolbarAlign.Right, order: 0)]
|
||||||
public class ResourceModeDropdownField : IMGUIContainer
|
public class ResourceModeDropdownField : IMGUIContainer
|
||||||
{
|
{
|
||||||
private static GUIContent appConfigBtContent;
|
private GUIContent appConfigBtContent;
|
||||||
|
|
||||||
private static readonly string[] _resourceModeNames =
|
private readonly string[] _resourceModeNames =
|
||||||
{
|
{
|
||||||
"Editor",
|
"Editor",
|
||||||
"Offline",
|
"Offline",
|
||||||
@ -42,7 +42,7 @@ namespace AlicizaX.Editor.Extension
|
|||||||
GUILayout.EndHorizontal();
|
GUILayout.EndHorizontal();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DrawEditorToolDropdownMenus()
|
void DrawEditorToolDropdownMenus()
|
||||||
{
|
{
|
||||||
int index = EditorPrefs.GetInt(ResourceComponent.PrefsKey, 0);
|
int index = EditorPrefs.GetInt(ResourceComponent.PrefsKey, 0);
|
||||||
GenericMenu popMenu = new GenericMenu();
|
GenericMenu popMenu = new GenericMenu();
|
||||||
@ -56,7 +56,7 @@ namespace AlicizaX.Editor.Extension
|
|||||||
popMenu.ShowAsContext();
|
popMenu.ShowAsContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClickToolsSubmenu(int menuIdx)
|
void ClickToolsSubmenu(int menuIdx)
|
||||||
{
|
{
|
||||||
EditorPrefs.SetInt(ResourceComponent.PrefsKey, menuIdx);
|
EditorPrefs.SetInt(ResourceComponent.PrefsKey, menuIdx);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user