CrabUI
Loading...
Searching...
No Matches
CUICloseButton.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Reflection;
5
6using Barotrauma;
7using Microsoft.Xna.Framework;
8using Microsoft.Xna.Framework.Input;
9using Microsoft.Xna.Framework.Graphics;
10using System.Xml.Linq;
11using Barotrauma.Extensions;
12namespace CrabUI
13{
14 // hmm, idk if this should be a prefab or component
15 // it's too small for component
16 // but in prefab i can't use initializer
17 public class CUICloseButton : CUIButton
18 {
19 public CUICloseButton() : base()
20 {
21 Command = "Close Frame";
22 Text = "";
23 BackgroundSprite = CUI.TextureManager.GetCUISprite(3, 1);
24 Absolute = new CUINullRect(0, 0, 15, 15);
25 }
26
27 }
28}
string Command
This command will be dispatched up when some component specific event happens.
CUINullRect Absolute
Absolute size and position in pixels.
CUISprite BackgroundSprite
Will be drawn in background with BackgroundColor Default is solid white 1x1 texture.