using Godot; using Rokojori; namespace Rokojori { [Tool] [GlobalClass] public partial class UIText:Label,UIStylePropertyContainer { [Export] public UIStyle parentStyle; [Export] public UINumber fontSize; [ExportCategory("Size & Margins")] [Export] public UINumber width; [Export] public UINumber height; [Export] public UINumber margin; [Export] public UINumber marginLeft; [Export] public UINumber marginTop; [Export] public UINumber marginRight; [Export] public UINumber marginBottom; [ExportCategory("Position")] [Export] public UIPosition position; [Export] public UINumber left; [Export] public UINumber top; [Export] public UINumber right; [Export] public UINumber bottom; [ExportCategory("Rotation & Scale")] [Export] public UINumber pivotX; [Export] public UINumber pivotY; [Export] public UINumber rotation; [Export] public UINumber scale; [Export] public UINumber scaleX; [Export] public UINumber scaleY; public UIStyle GetUIStyleParent() { return parentStyle; } public UIPosition GetUIPosition() { return position; } public UINumber GetUIStyleNumberProperty( UIStyleNumberProperty property ) { switch ( property ) { case UIStyleNumberProperty.Width: return width; case UIStyleNumberProperty.Height: return height; case UIStyleNumberProperty.Margin: return margin; case UIStyleNumberProperty.MarginLeft: return marginLeft; case UIStyleNumberProperty.MarginRight: return marginRight; case UIStyleNumberProperty.MarginTop: return marginTop; case UIStyleNumberProperty.MarginBottom: return marginBottom; case UIStyleNumberProperty.Left: return left; case UIStyleNumberProperty.Right: return right; case UIStyleNumberProperty.Top: return top; case UIStyleNumberProperty.Bottom: return bottom; case UIStyleNumberProperty.PivotX: return pivotX; case UIStyleNumberProperty.PivotY: return pivotY; case UIStyleNumberProperty.Rotation: return rotation; case UIStyleNumberProperty.Scale: return scale; case UIStyleNumberProperty.ScaleX: return scaleX; case UIStyleNumberProperty.ScaleY: return scaleY; } return null; } } }