public ExternalIndent(ExternalIndent indent) { this.Left = indent.Left; this.Up = indent.Up; this.Right = indent.Right; this.Down = indent.Down; }
internal AlignmentConfiguration(Alignment alignment, ExternalIndent indent = null, bool boundsIsIndent = true) { Alignment = alignment; Indent = indent ?? new ExternalIndent(UIDefault.ExternalIndent); BoundsIsIndent = boundsIsIndent; }
internal LayoutConfiguration(Alignment alignment = Alignment.Center, Direction direction = Style.Direction.Down, Side side = Style.Side.Center, ExternalIndent indent = null, int childIndent = 1, bool boundsIsIndent = true) { Alignment = alignment; Direction = direction; Side = side; Indent = indent ?? new ExternalIndent(UIDefault.ExternalIndent); ChildOffset = childIndent; BoundsIsIndent = boundsIsIndent; }
/// <summary> /// Widget for adding a label to the left side of some other input widget (Checkbox/InputLabel/Slider/...). /// </summary> public FormField(IInput input, int x, int y, int width, int height, string text, LabelStyle style = null, ExternalIndent inputIndent = null) : base(x, y, width, height, text, new UIConfiguration() { UseBegin = false }, style) { if (!(input is VisualObject)) { throw new ArgumentException($"{nameof(input)} must be VisualObject, IInput."); } Input = input; Add((VisualObject)input) .SetAlignmentInParent(Alignment.Right, inputIndent); }