CrabUI
Loading...
Searching...
No Matches
PGNAssets.cs
1using System;
2using System.Reflection;
3using System.Runtime.CompilerServices;
4using System.Collections.Generic;
5using System.Collections.Immutable;
6using System.Linq;
7using System.IO;
8
9using Barotrauma;
10using HarmonyLib;
11using Microsoft.Xna.Framework;
12using Microsoft.Xna.Framework.Graphics;
13
14using CrabUI;
15
16namespace CrabUITest
17{
18 public partial class PropTest : FillMethods
19 {
20
21 public static void PGNAssets(CUIComponent Main)
22 {
23 CUIFrame frame = new CUIFrame()
24 {
25 Anchor = CUIAnchor.Center,
26 Relative = new CUINullRect(w: 0.4f, h: 0.4f),
27 BackgroundSprite = new CUISprite("Dev.png"),
28 BackgroundColor = Color.White,
29 };
30
31 Main.Append(frame);
32 }
33
34
35 }
36}
CUIAnchor is just a Vector2 This is a static class containing some helper methods.
Definition CUIAnchor.cs:18
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
Wrapper Containing link to texture and drawing settings, like SourceRedt, DrawMode,...
Definition CUISprite.cs:27
Rectangle with float?
Definition CUIRect.cs:104