2using System.Collections.Generic;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
19 public partial class CUIComponent
33 set =>
CUIProps.CullChildren.SetValue(value);
47 get =>
CUIProps.ChildrenOffset.Value;
48 set =>
CUIProps.ChildrenOffset.SetValue(value);
59 [CUISerializable]
public bool Fixed {
get;
set; }
63 [CUISerializable]
public Vector2
Anchor {
get;
set; }
76 set =>
CUIProps.Ghost.SetValue(value);
87 set =>
CUIProps.ZIndex.SetValue(value);
97 get =>
CUIProps.ResizeToSprite.Value;
98 set =>
CUIProps.ResizeToSprite.SetValue(value);
107 get =>
CUIProps.FillEmptySpace.Value;
108 set =>
CUIProps.FillEmptySpace.SetValue(value);
117 set =>
CUIProps.FitContent.SetValue(value);
126 set =>
CUIProps.Absolute.SetValue(value);
132 set =>
CUIProps.AbsoluteMin.SetValue(value);
135 public CUINullRect AbsoluteMax
138 set =>
CUIProps.AbsoluteMax.SetValue(value);
147 set =>
CUIProps.Relative.SetValue(value);
153 set =>
CUIProps.RelativeMin.SetValue(value);
156 public CUINullRect RelativeMax
159 set =>
CUIProps.RelativeMax.SetValue(value);
169 get =>
CUIProps.CrossRelative.Value;
170 set =>
CUIProps.CrossRelative.SetValue(value);
CUIBool2 FillEmptySpace
Will be resized to fill empty space in list components.
CUINullRect Relative
Relative to parent size and position, [0..1].
CUI3DOffset ChildrenOffset
Will shift all children by this much, e.g. this is how scroll works It's also 3D.
Point? GridCell
Sets both GridStartCell and GridEndCell at once.
bool ResizeToSprite
If true component will set it's Absolute size to sprite texture size.
CUIComponentProps CUIProps
Just a wrapper for CUIProps idk how to separate them better.
string GridTemplateColumns
Used in Grid, space separated Columns sizes, either in pixels (123) or in % (123%)
Vector2 Anchor
this point of this component
bool HideChildrenOutsideFrame
Should children be cut off by scissor rect, this is just visual, it's not the same as culling.
CUIBool2 FitContent
Will resize itself to fit components with absolute size, e.g. text.
string GridTemplateRows
Used in Grid, space separated Row sizes, either in pixels (123) or in % (123%)
bool Fixed
Should it ignore child offset?
CUINullRect CrossRelative
It's like Relative, but to the opposite dimension E.g. Real.Width = CrossRelative....
Point? GridStartCell
Component will be placed in this cell in the grid component.
bool UnCullable
It shouldn't be culled off even outside of parent bounds and even if parent demands so.
Func< CUIRect, CUIBoundaries > ChildrenBoundaries
Limits to children positions.
Vector2? ParentAnchor
will be attached to this point of parent
bool CullChildren
if child rect doesn't intersect with parent it won't be drawn and won't consume fps It also sets Hi...
Point? GridEndCell
And resized to fit cells from GridStartCell to GridEndCell.
CUIBool2 Ghost
Ghost components don't affect layout.
int? ZIndex
Components are drawn in order of their ZIndex Normally it's derived from component position in the ...
CUINullRect Absolute
Absolute size and position in pixels.
Offset of child components with X, Y, Z.