2using System.Collections.Generic;
4using System.Reflection;
7using Microsoft.Xna.Framework;
8using Microsoft.Xna.Framework.Input;
9using Microsoft.Xna.Framework.Graphics;
13 public class CUIPropsDebug : CUIFrame
15 static CUIPropsDebug() { CUI.OnDispose += () => { Instance =
null; }; }
16 public static CUIPropsDebug Instance;
17 public static bool Opened => Instance?.Parent !=
null;
18 public static CUIPropsDebug Open()
22 Instance =
new CUIPropsDebug();
23 CUI.TopMain.Append(Instance);
29 public CUIComponentSelector Selector;
30 public CUIPropsInterface Props;
32 public CUIPropsDebug() : base()
34 Absolute =
new CUINullRect(w: 600, h: 400);
35 Anchor =
new Vector2(0.3f, 0.5f);
37 this[
"layout"] =
new CUIVerticalList()
39 Relative =
new CUINullRect(0, 0, 1, 1),
41 this[
"layout"][
"handle"] = CUIPrefab.FormHandle(
"Prop Debug");
42 this[
"layout"][
"main"] =
new CUIHorizontalList()
45 ConsumeDragAndDrop =
true,
48 this[
"layout"][
"main"][
"select"] = Selector =
new CUIComponentSelector()
51 DeepPalette = PaletteOrder.Secondary,
54 this[
"layout"][
"main"][
"props"] = Props =
new CUIPropsInterface()
57 DeepPalette = PaletteOrder.Secondary,
60 Selector.OnSelect += (c) => Props.Target = c;
CUIBool2 FillEmptySpace
Will be resized to fill empty space in list components.
CUINullRect Relative
Relative to parent size and position, [0..1].
Color BackgroundColor
Color of BackgroundSprite, default is black If you're using custom sprite and don't see it make sur...
Vector2 Anchor
this point of this component
CUIBool2 FitContent
Will resize itself to fit components with absolute size, e.g. text.
CUINullRect Absolute
Absolute size and position in pixels.