CrabUI
Loading...
Searching...
No Matches
CrabUITest.EventTest Class Reference

Testing events. More...

Inheritance diagram for CrabUITest.EventTest:
CrabUITest.FillMethods CrabUITest.FillMethods

Static Public Member Functions

static void MouseEnter (CUIComponent Main)
 
static void RelativeDrag (CUIComponent Main)
 
- Static Public Member Functions inherited from CrabUITest.FillMethods
static bool IsTestMethod (MethodInfo mi)
 

Detailed Description

Testing events.

Definition at line 18 of file RelativeDrag.cs.

Member Function Documentation

◆ MouseEnter()

static void CrabUITest.EventTest.MouseEnter ( CUIComponent Main)
static

Definition at line 42 of file MouseEnter.cs.

43 {
44 CUIFrame frame = new CUIFrame(0.4f, 0.2f, 0.2f, 0.2f);
45
46 frame.Append(new Chamelion()).Append(new Chamelion()).Append(new Chamelion()).Append(new Chamelion());
47
48 Main.Append(frame);
49 }
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

◆ RelativeDrag()

static void CrabUITest.EventTest.RelativeDrag ( CUIComponent Main)
static

Definition at line 21 of file RelativeDrag.cs.

22 {
23 CUIFrame frame = new CUIFrame()
24 {
25 Anchor = CUIAnchor.Center,
26 Relative = new CUINullRect(w: 0.4f, h: 0.4f),
27 };
28
29 frame["box"] = new CUIComponent()
30 {
31 Anchor = CUIAnchor.Center,
32 Relative = new CUINullRect(w: 0.5f, h: 0.5f),
33 Draggable = true,
34 };
35
36 frame["box"].DragHandle.DragRelative = true;
37
38 Main.Append(frame);
39 }
CUIAnchor is just a Vector2 This is a static class containing some helper methods.
Definition CUIAnchor.cs:18
Base class for all components.
Rectangle with float?
Definition CUIRect.cs:104

The documentation for this class was generated from the following files: