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

@@ -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();