同步之前的修改

This commit is contained in:
2025-05-24 16:01:59 +08:00
parent a510a86ce5
commit e5edc8f863
8 changed files with 61 additions and 143 deletions

View File

@@ -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>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>

View File

@@ -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>

View File

@@ -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">{
&quot;associatedIndex&quot;: 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>

View File

@@ -176,8 +176,8 @@ namespace SesothoLine
// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>λ<EFBFBD><CEBB>
if (TrackingTool.EnableTool || TrackingTool._enableAuxiliaryTool)
{
MacroDebugDraw.DrawDownArrow(NearestPoint, Color.magenta);
MacroDebugDraw.DrawDownArrow(NearestLineTangentPoint, Color.green);
MacroDebugDraw.DrawDownArrow(NearestPoint, Quaternion.identity, Color.magenta);
MacroDebugDraw.DrawDownArrow(NearestLineTangentPoint, Quaternion.identity, Color.green);
}
}

View File

@@ -87,7 +87,7 @@ namespace SesothoLine
foreach (var index in indexs.Indexs)
{
MacroDebugDraw.DrawDownArrow(
index.GetCellWorldIndexPosition() + MacroMath.RandomVector3(0.1f, Identifier),
index.GetCellWorldIndexPosition() + MacroMath.RandomVector3(0.1f, Identifier), Quaternion.identity,
Color.red);
}
}

View File

@@ -3,14 +3,12 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using XericLibrary.Runtime.CustomEditor;
using Object = UnityEngine.Object;
using Sirenix.OdinInspector;
#if UNITY_EDITOR
using Sirenix.Utilities.Editor;
@@ -25,7 +23,8 @@ namespace XericLibrary.Runtime.MacroLibrary
{
#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)
{
@@ -79,7 +78,6 @@ namespace XericLibrary.Runtime.MacroLibrary
}
/// <summary>
/// 在单选项组上注册一个事件,当组中的任意成员变成激活状态时调用(其他的不会发生调用)。
/// </summary>
@@ -96,6 +94,7 @@ namespace XericLibrary.Runtime.MacroLibrary
});
}
}
/// <summary>
/// 清空单选项组中的所有事件(与注册所有事件对应,但那个事件没法单独注销)
/// </summary>
@@ -137,8 +136,7 @@ namespace XericLibrary.Runtime.MacroLibrary
[LabelText("单选组")] public ToggleGroup ToggleGroup;
[SerializeField, LabelText("编辑单选项目顺序")]
[ListDrawerSettings(OnTitleBarGUI = "GetAndSortToggle")]
[SerializeField, LabelText("编辑单选项目顺序")] [ListDrawerSettings(OnTitleBarGUI = "GetAndSortToggle")]
private List<Toggle> toggleList = new List<Toggle>();
// 当前选中的项目
@@ -168,11 +166,7 @@ namespace XericLibrary.Runtime.MacroLibrary
// 自动获取并排序
if (SirenixEditorGUI.ToolbarButton(EditorIcons.Refresh))
{
var newToggleList = MacroSort.FullCharacterOrderSort(ToggleGroup.GetToggles(), a => a.name).ToList();
if (newToggleList.Count <= 0 || newToggleList == null)
Debug.LogError("如果无法更新获取自动排序toggle可能是因为toggleGroup被隐藏了手动将其激活后再获取即可。");
else
toggleList = newToggleList;
GetSortToggle();
}
// 反转顺序
if (SirenixEditorGUI.ToolbarButton(EditorIcons.TriangleDown))
@@ -180,12 +174,17 @@ namespace XericLibrary.Runtime.MacroLibrary
toggleList.Reverse();
}
#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)
Debug.LogError("如果无法更新获取自动排序toggle可能是因为toggleGroup被隐藏了手动将其激活后再获取即可。");
else
toggleList = newToggleList;
#endif
}
}
#endregion
@@ -237,6 +236,7 @@ namespace XericLibrary.Runtime.MacroLibrary
Debug.LogWarning($"在初始化单选项组时,{ToggleGroup.name}并未预先指定索引顺序,将默认使用大纲顺序。");
}
}
// 事件初始化
for (int i = 0; i < toggleList.Count; i++)
{
@@ -300,11 +300,11 @@ namespace XericLibrary.Runtime.MacroLibrary
if (allowDestroy)
Object.Destroy(t);
}
toggleList.Clear();
}
/// <summary>
/// toggle注册的事件只有当按下时才需要调用此事件。
/// </summary>
@@ -330,7 +330,6 @@ namespace XericLibrary.Runtime.MacroLibrary
}
/// <summary>
/// 获取toggle代表的索引
/// </summary>
@@ -361,6 +360,7 @@ namespace XericLibrary.Runtime.MacroLibrary
{
target.isOn = true;
}
/// <summary>
/// 设置单选项激活
/// </summary>
@@ -372,6 +372,7 @@ namespace XericLibrary.Runtime.MacroLibrary
SetToggleOn(toggleList[index]);
}
}
/// <summary>
/// 设置单选项激活
/// </summary>
@@ -380,6 +381,7 @@ namespace XericLibrary.Runtime.MacroLibrary
{
target.SetIsOnWithoutNotify(true);
}
/// <summary>
/// 设置单选项激活
/// </summary>
@@ -411,11 +413,11 @@ namespace XericLibrary.Runtime.MacroLibrary
{
Object.Destroy(toggleList[i]);
}
Clear();
}
#endregion
}
#endregion