This commit is contained in:
CortexCore
2023-11-02 20:58:55 +08:00
parent f0f348c246
commit ee3ecec6cb
168 changed files with 58830 additions and 379 deletions

View File

@@ -65,9 +65,9 @@ namespace BITKit
public bool TryGetEntried(out T value)
{
EnsureConfiguration();
if (index is not -1)
if (m_index is not -1)
{
value = list[index];
value = list[m_index];
return true;
}
value = default;
@@ -86,7 +86,6 @@ namespace BITKit
else
{
var currentIndex = m_index;
m_index = index;
if (currentIndex is not -1 && list.TryGetElementAt(currentIndex, out var currentElement))
{
currentElement.Exit();
@@ -100,7 +99,7 @@ namespace BITKit
currentElement.IsEntered = false;
OnExit?.Invoke(currentElement);
}
m_index = index;
if (index is not -1 && list.TryGetElementAt(index, out var nextElement))
{
nextElement.IsEntered = true;