CrabUI
Loading...
Searching...
No Matches
FramesVsAnchors.cs
1using System;
2using System.Reflection;
3using System.Runtime.CompilerServices;
4using System.Collections.Generic;
5using System.Collections.Immutable;
6using System.Linq;
7
8using Barotrauma;
9using HarmonyLib;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Graphics;
12
13using CrabUI;
14
15namespace CrabUITest
16{
17 /// <summary>
18 /// Random tests
19 /// </summary>
20 public partial class RandomTest : FillMethods
21 {
22 public static void FramesVsAnchors(CUIComponent Main)
23 {
24 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.TopLeft });
25 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.TopCenter });
26 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.TopRight });
27 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.CenterLeft });
28 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.Center });
29 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.CenterRight });
30 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.BottomLeft });
31 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.BottomCenter });
32 Main.Append(new CUIFrame(null, null, 0.2f, 0.2f) { Anchor = CUIAnchor.BottomRight });
33 }
34
35 }
36}
Base class for all components.
virtual CUIComponent Append(CUIComponent child, string name=null, [CallerMemberName] string memberName="")
Adds children to the end of the list.
Draggable and resizable container for other components.
Definition CUIFrame.cs:16