CrabUI
Loading...
Searching...
No Matches
CUITickBoxTest.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;
12using System.IO;
13
14using CrabUI;
15
16namespace CrabUITest
17{
18 public partial class ComponentTest : FillMethods
19 {
20 public static void CUITickBox(CUIComponent Host)
21 {
22 CUIFrame frame = new CUIFrame(0.6f, 0.2f, 0.3f, 0.4f);
23
24 frame["tickbox1"] = new CUITickBox()
25 {
26 Absolute = new CUINullRect(100, 100, 20, 20),
27 };
28
29 frame["tickbox2"] = new CUITickBox()
30 {
31 Absolute = new CUINullRect(150, 100, 50, 50),
32 Disabled = true,
33 };
34
35
36
37 Host.Append(frame);
38 }
39 }
40}
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
Just a tick box.
Definition CUITickBox.cs:17
Rectangle with float?
Definition CUIRect.cs:104