2using System.Collections.Generic;
6using Microsoft.Xna.Framework;
7using Microsoft.Xna.Framework.Input;
8using Microsoft.Xna.Framework.Graphics;
17 [CUISerializable]
public bool Scrollable {
get;
set; }
18 [CUISerializable]
public float ScrollSpeed {
get;
set; } = 1.0f;
20 [CUISerializable]
public float LeftGap {
get;
set; } = 0f;
21 [CUISerializable]
public float RightGap {
get;
set; } = 0f;
35 public CUIDirection Direction
37 get => ListLayout.Direction;
38 set => ListLayout.Direction = value;
45 get => ListLayout.Gap;
46 set => ListLayout.Gap = value;
50 public bool ResizeToHostHeight
52 get => ListLayout.ResizeToHostHeight;
53 set => ListLayout.ResizeToHostHeight = value;
61 if (!Scrollable)
return;
72 maxX: Math.Min(
Real.Width - ListLayout.TotalWidth - RightGap, 0)
79 OnScroll += (m) => Scroll += m.Scroll * ScrollSpeed;
Base class for all components.
CUI3DOffset ChildrenOffset
Will shift all children by this much, e.g. this is how scroll works It's also 3D.
CUIComponentProps CUIProps
Just a wrapper for CUIProps idk how to separate them better.
CUIRect Real
Calculated prop, position on real screen in pixels Should be fully calculated after CUIMainComponent....
Func< CUIRect, CUIBoundaries > ChildrenBoundaries
Limits to children positions.
bool CullChildren
if child rect doesn't intersect with parent it won't be drawn and won't consume fps It also sets Hi...
Resizing components to it's Height and placing them sequentially.
Resizing components to it's Height and placing them sequentially.
Base class for all layouts.
Defining Boundaries, not the same as rect containing min/max x, y, z.