同步之前的修改
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
|
||||||
</project>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="UserContentModel">
|
|
||||||
<attachedFolders />
|
|
||||||
<explicitIncludes />
|
|
||||||
<explicitExcludes />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RiderProjectSettingsUpdater">
|
|
||||||
<option name="vcsConfiguration" value="2" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="ebb90e97-f354-453f-8b74-0bb83b47e00e" name="更改" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/../../Developer/DLLDev/XericLibrary/MacroLibrary/MacroObject.cs" beforeDir="false" afterPath="$PROJECT_DIR$/../../Developer/DLLDev/XericLibrary/MacroLibrary/MacroObject.cs" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/../../Developer/DLLDev/XericLibraryEditor/XericLibraryEditor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/../../Developer/DLLDev/XericLibraryEditor/XericLibraryEditor.csproj" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectColorInfo">{
|
|
||||||
"associatedIndex": 7
|
|
||||||
}</component>
|
|
||||||
<component name="ProjectId" id="2tmgRy20ttbG5bPRqK1ymOlCF4G" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
|
||||||
"keyToString": {
|
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
||||||
"WebServerToolWindowFactoryState": "false",
|
|
||||||
"git-widget-placeholder": "master",
|
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
|
||||||
"vue.rearranger.settings.migration": "true"
|
|
||||||
},
|
|
||||||
"keyToStringList": {
|
|
||||||
"rider.external.source.directories": [
|
|
||||||
"C:\\Users\\LRC\\AppData\\Roaming\\JetBrains\\Rider2023.2\\resharper-host\\DecompilerCache",
|
|
||||||
"C:\\Users\\LRC\\AppData\\Roaming\\JetBrains\\Rider2023.2\\resharper-host\\SourcesCache",
|
|
||||||
"C:\\Users\\LRC\\AppData\\Local\\Symbols\\src"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}]]></component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="默认任务">
|
|
||||||
<changelist id="ebb90e97-f354-453f-8b74-0bb83b47e00e" name="更改" comment="" />
|
|
||||||
<created>1740962660807</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1740962660807</updated>
|
|
||||||
<workItem from="1740962665165" duration="4000" />
|
|
||||||
<workItem from="1740962676618" duration="24000" />
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
<component name="VcsManagerConfiguration">
|
|
||||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -176,8 +176,8 @@ namespace SesothoLine
|
|||||||
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>λ<EFBFBD><CEBB>
|
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>λ<EFBFBD><CEBB>
|
||||||
if (TrackingTool.EnableTool || TrackingTool._enableAuxiliaryTool)
|
if (TrackingTool.EnableTool || TrackingTool._enableAuxiliaryTool)
|
||||||
{
|
{
|
||||||
MacroDebugDraw.DrawDownArrow(NearestPoint, Color.magenta);
|
MacroDebugDraw.DrawDownArrow(NearestPoint, Quaternion.identity, Color.magenta);
|
||||||
MacroDebugDraw.DrawDownArrow(NearestLineTangentPoint, Color.green);
|
MacroDebugDraw.DrawDownArrow(NearestLineTangentPoint, Quaternion.identity, Color.green);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace SesothoLine
|
|||||||
foreach (var index in indexs.Indexs)
|
foreach (var index in indexs.Indexs)
|
||||||
{
|
{
|
||||||
MacroDebugDraw.DrawDownArrow(
|
MacroDebugDraw.DrawDownArrow(
|
||||||
index.GetCellWorldIndexPosition() + MacroMath.RandomVector3(0.1f, Identifier),
|
index.GetCellWorldIndexPosition() + MacroMath.RandomVector3(0.1f, Identifier), Quaternion.identity,
|
||||||
Color.red);
|
Color.red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,12 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using XericLibrary.Runtime.CustomEditor;
|
using XericLibrary.Runtime.CustomEditor;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using Sirenix.Utilities.Editor;
|
using Sirenix.Utilities.Editor;
|
||||||
@@ -25,7 +23,8 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
{
|
{
|
||||||
#region toggle 扩展
|
#region toggle 扩展
|
||||||
|
|
||||||
private static FieldInfo togglesFieldInfo = typeof(ToggleGroup).GetField("m_Toggles", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
private static FieldInfo togglesFieldInfo = typeof(ToggleGroup).GetField("m_Toggles",
|
||||||
|
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||||
|
|
||||||
public static List<Toggle> GetToggles(this ToggleGroup toggleGroup)
|
public static List<Toggle> GetToggles(this ToggleGroup toggleGroup)
|
||||||
{
|
{
|
||||||
@@ -79,7 +78,6 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 在单选项组上注册一个事件,当组中的任意成员变成激活状态时调用(其他的不会发生调用)。
|
/// 在单选项组上注册一个事件,当组中的任意成员变成激活状态时调用(其他的不会发生调用)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -96,6 +94,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清空单选项组中的所有事件(与注册所有事件对应,但那个事件没法单独注销)
|
/// 清空单选项组中的所有事件(与注册所有事件对应,但那个事件没法单独注销)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -137,8 +136,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
|
|
||||||
[LabelText("单选组")] public ToggleGroup ToggleGroup;
|
[LabelText("单选组")] public ToggleGroup ToggleGroup;
|
||||||
|
|
||||||
[SerializeField, LabelText("编辑单选项目顺序")]
|
[SerializeField, LabelText("编辑单选项目顺序")] [ListDrawerSettings(OnTitleBarGUI = "GetAndSortToggle")]
|
||||||
[ListDrawerSettings(OnTitleBarGUI = "GetAndSortToggle")]
|
|
||||||
private List<Toggle> toggleList = new List<Toggle>();
|
private List<Toggle> toggleList = new List<Toggle>();
|
||||||
|
|
||||||
// 当前选中的项目
|
// 当前选中的项目
|
||||||
@@ -168,11 +166,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
// 自动获取并排序
|
// 自动获取并排序
|
||||||
if (SirenixEditorGUI.ToolbarButton(EditorIcons.Refresh))
|
if (SirenixEditorGUI.ToolbarButton(EditorIcons.Refresh))
|
||||||
{
|
{
|
||||||
var newToggleList = MacroSort.FullCharacterOrderSort(ToggleGroup.GetToggles(), a => a.name).ToList();
|
GetSortToggle();
|
||||||
if (newToggleList.Count <= 0 || newToggleList == null)
|
|
||||||
Debug.LogError("如果无法更新获取自动排序toggle,可能是因为toggleGroup被隐藏了,手动将其激活后再获取即可。");
|
|
||||||
else
|
|
||||||
toggleList = newToggleList;
|
|
||||||
}
|
}
|
||||||
// 反转顺序
|
// 反转顺序
|
||||||
if (SirenixEditorGUI.ToolbarButton(EditorIcons.TriangleDown))
|
if (SirenixEditorGUI.ToolbarButton(EditorIcons.TriangleDown))
|
||||||
@@ -180,12 +174,17 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
toggleList.Reverse();
|
toggleList.Reverse();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
var newToggleList = MacroSort.FullCharacterOrderSort(ToggleGroup.GetToggles(), a => a.name).ToList();
|
GetSortToggle();
|
||||||
|
#endif
|
||||||
|
void GetSortToggle()
|
||||||
|
{
|
||||||
|
var newToggleList = MacroSort.FullCharacterOrderSort(ToggleGroup.GetToggles(), a => a.name)
|
||||||
|
.ToList();
|
||||||
if (newToggleList.Count <= 0 || newToggleList == null)
|
if (newToggleList.Count <= 0 || newToggleList == null)
|
||||||
Debug.LogError("如果无法更新获取自动排序toggle,可能是因为toggleGroup被隐藏了,手动将其激活后再获取即可。");
|
Debug.LogError("如果无法更新获取自动排序toggle,可能是因为toggleGroup被隐藏了,手动将其激活后再获取即可。");
|
||||||
else
|
else
|
||||||
toggleList = newToggleList;
|
toggleList = newToggleList;
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -237,6 +236,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
Debug.LogWarning($"在初始化单选项组时,{ToggleGroup.name}并未预先指定索引顺序,将默认使用大纲顺序。");
|
Debug.LogWarning($"在初始化单选项组时,{ToggleGroup.name}并未预先指定索引顺序,将默认使用大纲顺序。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 事件初始化
|
// 事件初始化
|
||||||
for (int i = 0; i < toggleList.Count; i++)
|
for (int i = 0; i < toggleList.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -300,11 +300,11 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
if (allowDestroy)
|
if (allowDestroy)
|
||||||
Object.Destroy(t);
|
Object.Destroy(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleList.Clear();
|
toggleList.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// toggle注册的事件,只有当按下时才需要调用此事件。
|
/// toggle注册的事件,只有当按下时才需要调用此事件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -330,7 +330,6 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取toggle代表的索引
|
/// 获取toggle代表的索引
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -361,6 +360,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
{
|
{
|
||||||
target.isOn = true;
|
target.isOn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置单选项激活
|
/// 设置单选项激活
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -372,6 +372,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
SetToggleOn(toggleList[index]);
|
SetToggleOn(toggleList[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置单选项激活
|
/// 设置单选项激活
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -380,6 +381,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
{
|
{
|
||||||
target.SetIsOnWithoutNotify(true);
|
target.SetIsOnWithoutNotify(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置单选项激活
|
/// 设置单选项激活
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -411,11 +413,11 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
{
|
{
|
||||||
Object.Destroy(toggleList[i]);
|
Object.Destroy(toggleList[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -486,7 +488,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
|||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static RectTransform RectTransform<T>(this T target)
|
public static RectTransform RectTransform<T>(this T target)
|
||||||
where T : Component
|
where T : Component
|
||||||
=> target.transform as RectTransform;
|
=> target.transform as RectTransform;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user