1
This commit is contained in:
parent
0c5aa1a69c
commit
a87e5502aa
@ -9,7 +9,8 @@
|
|||||||
"GUID:acfef7cabed3b0a42b25edb1cd4fa259",
|
"GUID:acfef7cabed3b0a42b25edb1cd4fa259",
|
||||||
"GUID:2765e68924a08a94ea0ea66b31c0168f",
|
"GUID:2765e68924a08a94ea0ea66b31c0168f",
|
||||||
"GUID:1619e00706139ce488ff80c0daeea8e7",
|
"GUID:1619e00706139ce488ff80c0daeea8e7",
|
||||||
"GUID:2373f786d14518f44b0f475db77ba4de"
|
"GUID:2373f786d14518f44b0f475db77ba4de",
|
||||||
|
"GUID:fb064c8bf96bac94e90d2f39090daa94"
|
||||||
],
|
],
|
||||||
"includePlatforms": [
|
"includePlatforms": [
|
||||||
"Editor"
|
"Editor"
|
||||||
|
|||||||
@ -9,7 +9,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
public static class AppBuildHelper
|
public static class AppBuildHelper
|
||||||
{
|
{
|
||||||
public static void GeneratAppBuilderSetting(Language language, bool debugMode, int resMode)
|
public static void GeneratAppBuilderSetting(string language, bool debugMode, int resMode)
|
||||||
{
|
{
|
||||||
const string AppBuilderSettingPath = "Assets/Resources/AppBuilderSetting.bytes";
|
const string AppBuilderSettingPath = "Assets/Resources/AppBuilderSetting.bytes";
|
||||||
AppBuilderSetting appBuilderSetting = new AppBuilderSetting();
|
AppBuilderSetting appBuilderSetting = new AppBuilderSetting();
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public class AppBuildParameter
|
|||||||
public bool DevelopBuild;
|
public bool DevelopBuild;
|
||||||
public int ResMode;
|
public int ResMode;
|
||||||
public string FileName;
|
public string FileName;
|
||||||
public Language Language;
|
public string Language;
|
||||||
public string[] Scenes;
|
public string[] Scenes;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -9,7 +9,7 @@ using System.IO;
|
|||||||
|
|
||||||
public class EditorIcons : EditorWindow
|
public class EditorIcons : EditorWindow
|
||||||
{
|
{
|
||||||
[MenuItem("Tools/EditorExtension/Editor Icons %e", priority = -1001)]
|
[MenuItem("Tools/Extension/Editor Icons %e", priority = -1001)]
|
||||||
public static void EditorIconsOpen()
|
public static void EditorIconsOpen()
|
||||||
{
|
{
|
||||||
#if UNITY_2018
|
#if UNITY_2018
|
||||||
|
|||||||
@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class AtlasConfigWindow : EditorWindow
|
public class AtlasConfigWindow : EditorWindow
|
||||||
{
|
{
|
||||||
[MenuItem("Tools/EditorExtension/图集工具/Configuration Panel")]
|
[MenuItem("Tools/Extension/图集工具/Configuration Panel")]
|
||||||
public static void ShowWindow()
|
public static void ShowWindow()
|
||||||
{
|
{
|
||||||
GetWindow<AtlasConfigWindow>("Atlas Config").minSize = new Vector2(500, 600);
|
GetWindow<AtlasConfigWindow>("Atlas Config").minSize = new Vector2(500, 600);
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public static class EditorSpriteSaveInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[MenuItem("Tools/EditorExtension/图集工具/ForceGenerateAll")]
|
[MenuItem("Tools/Extension/图集工具/ForceGenerateAll")]
|
||||||
public static void ForceGenerateAll()
|
public static void ForceGenerateAll()
|
||||||
{
|
{
|
||||||
_atlasMap.Clear();
|
_atlasMap.Clear();
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace TEngine.Editor
|
|||||||
mAssetTreeView?.OnGUI(new Rect(0, _toolbarGUIStyle.fixedHeight, position.width, position.height - _toolbarGUIStyle.fixedHeight));
|
mAssetTreeView?.OnGUI(new Rect(0, _toolbarGUIStyle.fixedHeight, position.width, position.height - _toolbarGUIStyle.fixedHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
[MenuItem("Tools/EditorExtension/查找资产引用 _F10", false, 100)]
|
[MenuItem("Tools/Extension/查找资产引用 _F10", false, 100)]
|
||||||
public static void FindRef()
|
public static void FindRef()
|
||||||
{
|
{
|
||||||
InitDataIfNeeded();
|
InitDataIfNeeded();
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using AlicizaX.Localization.Runtime;
|
using AlicizaX.Localization.Runtime;
|
||||||
using AlicizaX;
|
using AlicizaX;
|
||||||
|
using AlicizaX.Localization.Editor;
|
||||||
using Paps.UnityToolbarExtenderUIToolkit;
|
using Paps.UnityToolbarExtenderUIToolkit;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -15,12 +17,7 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
|
|
||||||
public void InitializeElement()
|
public void InitializeElement()
|
||||||
{
|
{
|
||||||
var nameArray = Enum.GetNames(typeof(Language));
|
_languageTypeNames = LocalizationConfiguration.Instance.LanguageTypeNames.ToArray();
|
||||||
_languageTypeNames = new string[nameArray.Length];
|
|
||||||
for (int i = 0; i < nameArray.Length; i++)
|
|
||||||
{
|
|
||||||
_languageTypeNames[i] = nameArray[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
appConfigBtContent =
|
appConfigBtContent =
|
||||||
EditorGUIUtility.TrTextContentWithIcon("", "",
|
EditorGUIUtility.TrTextContentWithIcon("", "",
|
||||||
@ -31,7 +28,7 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
private void MyGUIMethod()
|
private void MyGUIMethod()
|
||||||
{
|
{
|
||||||
GUILayout.BeginHorizontal();
|
GUILayout.BeginHorizontal();
|
||||||
string title = _languageTypeNames[GetPrefsIndex()];
|
string title = GetPrefsStr();
|
||||||
appConfigBtContent.text = title;
|
appConfigBtContent.text = title;
|
||||||
if (EditorGUILayout.DropdownButton(appConfigBtContent, FocusType.Passive, EditorStyles.toolbarPopup, GUILayout.MaxWidth(120)))
|
if (EditorGUILayout.DropdownButton(appConfigBtContent, FocusType.Passive, EditorStyles.toolbarPopup, GUILayout.MaxWidth(120)))
|
||||||
{
|
{
|
||||||
@ -44,26 +41,26 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
|
|
||||||
static void DrawEditorToolDropdownMenus()
|
static void DrawEditorToolDropdownMenus()
|
||||||
{
|
{
|
||||||
int index = GetPrefsIndex();
|
string langaugeName = GetPrefsStr();
|
||||||
GenericMenu popMenu = new GenericMenu();
|
GenericMenu popMenu = new GenericMenu();
|
||||||
for (int i = 0; i < _languageTypeNames.Length; i++)
|
for (int i = 0; i < _languageTypeNames.Length; i++)
|
||||||
{
|
{
|
||||||
var selected = index == i;
|
|
||||||
var toolAttr = _languageTypeNames[i];
|
var toolAttr = _languageTypeNames[i];
|
||||||
popMenu.AddItem(new GUIContent(toolAttr), selected, menuIdx => { ClickToolsSubmenu((int)menuIdx); }, i);
|
var selected = langaugeName == toolAttr;
|
||||||
|
popMenu.AddItem(new GUIContent(toolAttr), selected, menuIdx => { ClickToolsSubmenu(toolAttr); }, toolAttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
popMenu.ShowAsContext();
|
popMenu.ShowAsContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ClickToolsSubmenu(int menuIdx)
|
static void ClickToolsSubmenu(string langaugeName)
|
||||||
{
|
{
|
||||||
EditorPrefs.SetInt(LocalizationComponent.PrefsKey, menuIdx);
|
EditorPrefs.SetString(LocalizationComponent.PrefsKey, langaugeName);
|
||||||
Debug.Log(((Language)menuIdx).ToString());
|
Debug.Log(langaugeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetPrefsIndex()
|
static string GetPrefsStr()
|
||||||
{
|
{
|
||||||
return EditorPrefs.GetInt(LocalizationComponent.PrefsKey, 1);
|
return EditorPrefs.GetString(LocalizationComponent.PrefsKey, "None");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
internal static class ToolInfo
|
internal static class ToolInfo
|
||||||
{
|
{
|
||||||
public const string COMPANY_NAME = "Tools/EditorExtension/Toolbar";
|
public const string COMPANY_NAME = "Tools/Extension/Toolbar";
|
||||||
public const string EDITOR_MENU_BASE = COMPANY_NAME + "/" ;
|
public const string EDITOR_MENU_BASE = COMPANY_NAME + "/" ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user