using UnityEngine; using UnityEngine.UIElements; using Space = AV.UITK.FluentUITK.Space; using Button = AV.UITK.FluentUITK.Button; using UIE = UnityEngine.UIElements; using static AV.UITK.FluentUITK; namespace AV.UITK { public partial class FluentElement { internal FluentElement AddCoreStyles() { FluentUITK.AddCoreStyles(x); return x; } public FluentElement NewElement() { return new VisualElement(); } public FluentElement New() where TElement : VisualElement, new() { return new TElement(); } public FluentElement NewText(string text) { return new Text(text); } public FluentElement NewIcon(Texture background) { return new Icon(background); } public FluentElement NewHelpBox(string text, HelpMessageType type, Texture customIcon = null) { return new FluentUITK.HelpBox(text, type, customIcon); } public FluentElement NewSeparator() { return new Separator(); } public FluentElement
NewHeader(string text, Texture icon = null) { return new Header(text, icon); } public FluentElement NewFoldout(string text) { return new Foldout { text = text }; } public FluentElement NewRow(bool reverse = false) { return new Row(reverse); } public FluentElement NewColumn(bool reverse = false) { return new FluentUITK.Column(reverse); } public FluentElement NewGroup() { return new Group(); } public FluentElement NewIndentedGroup(int left = 15, int right = 1, int top = 0, int bottom = 0, bool useMargin = false, FlexDirection direction = UnityEngine.UIElements.FlexDirection.Column) { var group = new Group(direction).Fluent(); if (useMargin) group.Margin(top, left, right, bottom); else group.Padding(top, left, right, bottom); return group; } public FluentElement NewSpace(float width = float.NaN, float height = float.NaN) { return new Space(width, height); } public FluentElement NewFlexibleSpace(float flexGrow = 1) { return new FlexibleSpace(flexGrow); } public FluentElement NewTabsBar(Styles tabsStyle) { return new FluentUITK.TabsBar(tabsStyle); } public FluentElement NewTab(string text = null, Texture icon = null, Styles style = Styles.None) { return new FluentUITK.Tab(text, icon, style); } public FluentElement