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 TopGap {
get;
set; }
21 [CUISerializable]
public float BottomGap {
get;
set; }
36 public CUIDirection Direction
38 get => ListLayout.Direction;
39 set => ListLayout.Direction = value;
45 get => ListLayout.Gap;
46 set => ListLayout.Gap = value;
50 public bool ResizeToHostWidth
52 get => ListLayout.ResizeToHostWidth;
53 set => ListLayout.ResizeToHostWidth = value;
61 if (!Scrollable)
return;
72 minY: Math.Min(
Real.Height - ListLayout.TotalHeight - BottomGap, 0)
81 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...
Base class for all layouts.
Resizing components to it's Width and placing them sequentially.
Resizing components to it's Width and placing them sequentially.
Defining Boundaries, not the same as rect containing min/max x, y, z.