增加UIToggle和UIDropdown
This commit is contained in:
@@ -23,14 +23,12 @@ namespace MuHua {
|
||||
|
||||
public readonly UIScrollerFunc scrollerFunc;
|
||||
|
||||
public readonly VisualElement Dragger;
|
||||
public VisualElement Dragger => Q<VisualElement>("Dragger");
|
||||
|
||||
public UIScroller(VisualElement element, VisualElement canvas, UIDirection direction = UIDirection.FromLeftToRight) : base(element) {
|
||||
this.canvas = canvas;
|
||||
this.direction = direction;
|
||||
|
||||
Dragger = element.Q<VisualElement>("Dragger");
|
||||
|
||||
if (direction == UIDirection.FromLeftToRight) { scrollerFunc = new FromLeftToRight(this); }
|
||||
if (direction == UIDirection.FromRightToLeft) { scrollerFunc = new FromRightToLeft(this); }
|
||||
if (direction == UIDirection.FromTopToBottom) { scrollerFunc = new FromTopToBottom(this); }
|
||||
|
||||
Reference in New Issue
Block a user