CrabUI
Loading...
Searching...
No Matches
CrabUI Namespace Reference

Classes

class  AttachedItemHandle
 Link between Item and CUIComponent. More...
 
class  CUI
 In fact a static class managing static things. More...
 
struct  CUI3DOffset
 Offset of child components with X, Y, Z. More...
 
class  CUIAnchor
 CUIAnchor is just a Vector2
This is a static class containing some helper methods. More...
 
class  CUIAnimation
 WIP, can animate any property on any object Can run back and forth in [0..1] interval and interpolate any property between StartValue and EndValue. More...
 
struct  CUIBool2
 Vector2 but with bools. More...
 
struct  CUIBoundaries
 Defining Boundaries, not the same as rect
containing min/max x, y, z. More...
 
class  CUIButton
 A button
It's derived from CUITextBlock and has all its props. More...
 
class  CUICanvas
 Allows you to manipulate pixel data of its texture. More...
 
class  CUIComponent
 Base class for all components. More...
 
class  CUIDropDown
 Drop down list, aka Select. More...
 
class  CUIFrame
 Draggable and resizable container for other components. More...
 
class  CUIGlobalStyleResolver
 Contains all logic for resolving styles in the framework. More...
 
class  CUIGrid
 A Grid containing children in its cells. More...
 
class  CUIHorizontalList
 Resizing components to it's Height and placing them sequentially. More...
 
class  CUIInput
 Containing a snapshot of current mouse and keyboard state. More...
 
class  CUIInterpolate
 Class containing a few interpolate functions for CUIAnimation. More...
 
class  CUILayout
 Base class for all layouts. More...
 
class  CUILayoutGrid
 A Grid containing children in its cells
Dividing host into rows and columns basing on GridTemplate
And then placing children basin on their GridCell. More...
 
class  CUILayoutHorizontalList
 Resizing components to it's Height and placing them sequentially. More...
 
class  CUILayoutSimple
 Default layout, simple descartes coordinate plane. More...
 
class  CUILayoutVerticalList
 Resizing components to it's Width and placing them sequentially. More...
 
class  CUIMagnifyingGlass
 It's a debug tool, you can use it with cuimg command, it's very fps comsuming. More...
 
class  CUIMainComponent
 Orchestrating drawing and updating of it's children
Also a CUIComponent, but it's draw and update methods Attached directly to games life cycle. More...
 
class  CUIMap
 Swipable and zoomable plane
Allows you to place components in a plane and connect them with lines like a graph or scheme. More...
 
class  CUIMenuOption
 Component with a sprite that will notify parent CUIMenu when clicked. More...
 
class  CUIMenuText
 CUITextBlock adapted for CUIMenu. More...
 
class  CUIMessageBox
 Simple dialog box with a message and ok button
use public static void Open(string msg) to open it. More...
 
class  CUIMultiButton
 Button with multiple options which are rotating when you click. More...
 
struct  CUINullRect
 Rectangle with float? More...
 
struct  CUINullVector2
 Vector2, but with float? More...
 
class  CUIPages
 Container for other components
Can have only 1 child
Sets component as it's only child when you open it (as a page) More...
 
class  CUIParser
 Class for easy parsing and serialization of anything. More...
 
class  CUIProp
 Wrapper object for prop value, setters, side effects, metadata etc. More...
 
class  CUIRadialMenu
 Unfinished crap, don't use. More...
 
class  CUIRadialMenuOption
 Unfinished crap, don't use. More...
 
struct  CUIRect
 Rectangle with float. More...
 
class  CUISlider
 Horizontal range input. More...
 
class  CUISprite
 Wrapper Containing link to texture and drawing settings,
like SourceRedt, DrawMode, Effects, Rotation...
Multiple sprites can use the same texture. More...
 
class  CUIStyle
 In Fact just an observable dict. More...
 
class  CUITextBlock
 Passive block of text. More...
 
class  CUITextInput
 Text input. More...
 
class  CUITextureManager
 Class for loading textures without duplicates
Also disposes all loaded textures automatically. More...
 
class  CUITickBox
 Just a tick box. More...
 
class  CUIToggleButton
 A button which can be on and off
It's derived from CUITextBlock and has all its props. More...
 
class  CUIVerticalList
 Resizing components to it's Width and placing them sequentially. More...
 
class  CUIWater
 Just an example of what CUICanvas can be used for. More...
 
struct  FloatRange
 Same as Range but with normal floats. More...
 
interface  ICUIComponent
 Ignore this, i'm just thinking how to organize props, this is getting out of hand. More...
 
interface  ICUIVitalizable
 Props implementing this will be bound to their host with reflection after creation of the host. More...
 
interface  IListProps
 Props used in list layouts. More...
 
struct  IntRange
 Same as Range but with normal ints. More...
 
interface  IRefreshable
 For stuff that should be in some way refreshed
This method appears way too many times
There are also secret public void CascadeRefresh() method in CUIComponent.Events that refreshes all childs recursivelly. More...
 
interface  ISerializationProps
 Props used in serialization. More...
 
interface  ISimpleProps
 Props used in simple layout. More...
 
class  ModStorage
 Global data repository
Treat it as Dictionary<string, object>
In fact data is stored in GUI.Canvas.GUIComponent.Userdata. More...
 

Enumerations

enum  CUIAttribute { CUISerializable , DontSerialize , Calculated }
 
enum  CUITextAlign { Start , Center , End }
 
enum  CUISide { Top , Right , Bottom , Left }
 
enum  CUIDirection { Straight , Reverse }
 
enum  CUIMouseEvent { Down , DClick }
 
enum  CUISpriteDrawMode { Resize , Wrap , Static , StaticDeep }
 

Functions

record CUICommand (string Name, object Data=null)
 Can be dispatched up the component tree to notify parent about something add pass some event data without creating a hard link.
 
record CUIData (string Name, object Data=null)
 Can be dispatched down the component tree to pass some data to the children without creating a hard link.
 

Enumeration Type Documentation

◆ CUIAttribute

enum CrabUI.CUIAttribute

Definition at line 21 of file CUITypeMetaData.cs.

22 {
23 CUISerializable,
24 DontSerialize,
25 Calculated,
26 }

◆ CUIDirection

enum CrabUI.CUIDirection

Definition at line 15 of file CUI enums.cs.

15{ Straight, Reverse, }

◆ CUIMouseEvent

enum CrabUI.CUIMouseEvent

Definition at line 16 of file CUI enums.cs.

16{ Down, DClick }

◆ CUISide

enum CrabUI.CUISide

Definition at line 14 of file CUI enums.cs.

14{ Top, Right, Bottom, Left, }

◆ CUISpriteDrawMode

enum CrabUI.CUISpriteDrawMode

Definition at line 13 of file CUISprite.cs.

14 {
15 Resize,
16 Wrap,
17 Static,
18 StaticDeep,
19 }

◆ CUITextAlign

enum CrabUI.CUITextAlign

Definition at line 13 of file CUI enums.cs.

13{ Start, Center, End, }

Function Documentation

◆ CUICommand()

record CrabUI.CUICommand ( string Name,
object Data = null )

Can be dispatched up the component tree to notify parent about something add pass some event data without creating a hard link.

Parameters
Name