This commit is contained in:
CortexCore
2024-08-02 14:34:53 +08:00
parent d48a4abe1a
commit a256dc33ed
4 changed files with 8 additions and 1 deletions

View File

@@ -149,12 +149,13 @@ namespace BITKit.UX
}
isActive = true;
}
async UniTask IEntryElement.EntryAsync()
public virtual async UniTask EntryAsync()
{
if (entryDuration.Allow is false) return;
while (CurrentOpacity < 1 && TargetOpacity is 1)
{
await UniTask.NextFrame(cancellationToken);
if(destroyCancellationToken.IsCancellationRequested)return;
}
}
void IEntryElement.Entered()

View File

@@ -603,6 +603,7 @@ namespace BITKit
self.SetActive(visibleOnEmpty || result);
return result;
}
public static T Get<T>(this VisualElement self ,int index = 0) where T : VisualElement => self.Q<T>($"{typeof(T).Name}--{index}");
public static T Create<T>(this VisualElement self, string name = Constant.EmetyString) where T : VisualElement, new()
{
var element = new T();