CrabUI
|
In fact a static class managing static things. More...
Static Public Member Functions | |
static void | InvokeOnPauseMenuToggled () |
static void | ReEmitWindowTextInput (object sender, TextInputEventArgs e) |
static void | ReEmitWindowKeyDown (object sender, TextInputEventArgs e) |
static void | Initialize () |
Should be called in IAssemblyPlugin.Initialize. | |
static void | OnLoadCompleted () |
static void | Dispose () |
Should be called in IAssemblyPlugin.Dispose. | |
static void | CUIDebug_Command (string[] args) |
static void | CUIDebugProps_Command (string[] args) |
static void | CUIMG_Command (string[] args) |
static void | CUIDrawOrder_Command (string[] args) |
static void | CUIPrintTree_Command (string[] args) |
static void | PrintSprites_Command (string[] args) |
static string | WrapInColor (object msg, string color) |
$"‖color:{color}‖{msg}‖end‖" | |
static string | ArrayToString (IEnumerable< object > array) |
Serializes the array. | |
static void | Log (object msg, Color? color=null, [CallerFilePath] string source="", [CallerLineNumber] int lineNumber=0) |
Prints a message to console. | |
static void | Warning (object msg, Color? color=null, [CallerFilePath] string source="", [CallerLineNumber] int lineNumber=0) |
static string | GetCallerFolderPath ([CallerFilePath] string source="") |
xd | |
static void | Info (object msg, [CallerFilePath] string source="", [CallerLineNumber] int lineNumber=0) |
Prints debug message with source path Works only if debug is true. | |
static void | CheckOtherPatches (string msg="") |
static void | CheckPatches (string typeName, string methodName) |
static void | GUI_InputBlockingMenuOpen_Postfix (ref bool __result) |
static void | GUI_TogglePauseMenu_Postfix () |
static CUIComponent | Create (string componentName) |
Just an experimant Creates empty CUIComponent from class name. | |
static void | PrintColors_Command (string[] args) |
static void | CUICreateLuaTypesFile_Command (string[] args) |
static void | CUICreatePalette_Command (string[] args) |
static void | CUICreatePaletteSet_Command (string[] args) |
static void | CUILoadPaletteSet_Command (string[] args) |
static void | PrintKeysCommand (string[] args) |
static void | PaletteDemo_Command (string[] args) |
static void | Palette_Command (string[] args) |
static void | DrawTexture (SpriteBatch sb, CUIRect cuirect, Texture2D texture, Color cl, CUISpriteDrawMode drawMode=CUISpriteDrawMode.Resize) |
static void | DrawRectangle (SpriteBatch sb, CUIRect cuirect, Color cl, CUISprite sprite, float depth=0.0f) |
static void | DrawBorders (SpriteBatch sb, CUIComponent component, float depth=0.0f) |
static void | Error (object msg, int maxPrints=1, int tolerate=5, bool silent=false) |
Static Public Attributes | |
static string | CUITexturePath = "CUI.png" |
static CUI | Instance |
A singleton. | |
static bool | Debug |
This affects logging. | |
static Harmony | harmony |
static Random | Random = new Random() |
static int | UserCount = 0 |
In theory multiple mods could use same CUI instance, i clean it up when UserCount drops to 0. | |
const float | Pi2 = (float)(Math.PI / 2.0) |
static SamplerState | NoSmoothing |
static Dictionary< string, int > | Errors = new() |
Properties | |
static Vector2 | GameScreenSize [get] |
static Rectangle | GameScreenRect [get] |
static string | ModDir [get, set] |
Root folder of the mod, used to deduce lua folder location. | |
static bool | UseLua = true [get, set] |
If false CUI won't waste time on registering lua types and creating types file. | |
static string | LuaFolder [get, set] |
Should point to lua folder, if you want lua types file. | |
static string | AssetsPath [get, set] |
Path to assets folder with all CUI stuff. | |
static string | PalettesPath [get, set] |
static string | PGNAssets [get, set] |
If set CUI will also check this folder when loading textures. | |
static CUIMainComponent | Main [get] |
Orchestrates Drawing and updates, there could be only one CUI.Main is located under vanilla GUI. | |
static CUIMainComponent | TopMain [get] |
Orchestrates Drawing and updates, there could be only one CUI.TopMain is located above vanilla GUI. | |
static CUIInput | Input [get] |
Snapshot of mouse and keyboard state. | |
static CUITextureManager | TextureManager [get] |
Safe texture manager </summary. | |
static CUIFocusResolver | FocusResolver [get] |
Adapter to vanilla focus system, don't use. | |
static CUILuaRegistrar | LuaRegistrar [get] |
static CUIComponent | FocusedComponent [get, set] |
static bool | UseCursedPatches = true [get, set] |
If true other compiled mods that use CUI will break But if false then you'll have to setup hooks with lua or separate compiled plugin. | |
static string | HookIdentifier [get, set] |
It's used as harmony id and lua hooks id, it's deduced automatically from calling assembly name It's should be unique per mod or there will be conflicts You can set it to any string if you want. | |
static string | CUIHookID [get] |
static bool | Disposed = true [get, set] |
static bool | InputBlockingMenuOpen [get] |
static List< Func< bool > > | IsBlockingPredicates [get] |
Events | |
static Action | OnInit |
Called on first Initialize. | |
static Action | OnDispose |
Called on last Dispose. | |
static Action< TextInputEventArgs > | OnWindowTextInput |
static Action< TextInputEventArgs > | OnWindowKeyDown |
static Action | OnPauseMenuToggled |
In fact a static class managing static things.
Definition at line 15 of file CUIErrors.cs.
|
static |
Serializes the array.
Definition at line 29 of file CUI Logging.cs.
|
static |
Definition at line 20 of file CUI Patches.cs.
|
static |
Definition at line 46 of file CUI Patches.cs.
|
static |
Just an experimant Creates empty CUIComponent from class name.
componentName |
Definition at line 24 of file CUIBuilder.cs.
|
static |
Definition at line 50 of file CUICommands.cs.
|
static |
Definition at line 56 of file CUICommands.cs.
|
static |
Definition at line 65 of file CUICommands.cs.
|
static |
Definition at line 31 of file Debug Commands.cs.
|
static |
Definition at line 37 of file Debug Commands.cs.
|
static |
Definition at line 44 of file Debug Commands.cs.
|
static |
Definition at line 76 of file CUICommands.cs.
|
static |
Definition at line 49 of file Debug Commands.cs.
|
static |
Should be called in IAssemblyPlugin.Dispose.
Definition at line 250 of file CUI.cs.
|
static |
Definition at line 72 of file CUIDrawing.cs.
|
static |
Definition at line 47 of file CUIDrawing.cs.
|
static |
Definition at line 34 of file CUIDrawing.cs.
|
static |
Definition at line 18 of file CUIErrors.cs.
|
static |
xd
source | This should be injected by compiler, don't set |
|
static |
Definition at line 262 of file CUI Patches.cs.
|
static |
Definition at line 268 of file CUI Patches.cs.
|
static |
Prints debug message with source path Works only if debug is true.
Definition at line 66 of file CUI Logging.cs.
|
static |
Should be called in IAssemblyPlugin.Initialize.
Definition at line 196 of file CUI.cs.
|
static |
Prints a message to console.
Definition at line 37 of file CUI Logging.cs.
|
static |
|
static |
Definition at line 101 of file CUICommands.cs.
|
static |
Definition at line 96 of file CUICommands.cs.
|
static |
Definition at line 42 of file CUICommands.cs.
|
static |
Definition at line 81 of file CUICommands.cs.
|
static |
Definition at line 55 of file Debug Commands.cs.
|
static |
Definition at line 47 of file CUI Logging.cs.
|
static |
$"‖color:{color}‖{msg}‖end‖"
Definition at line 20 of file CUI Logging.cs.
|
static |
Definition at line 17 of file CUIErrors.cs.
|
static |
Definition at line 20 of file CUIDrawing.cs.
|
static |
Definition at line 17 of file CUIDrawing.cs.
|
static |
|
staticgetset |
|
staticgetset |
|
staticgetset |
Definition at line 104 of file CUI.cs.
|
staticget |
|
staticgetset |
It's used as harmony id and lua hooks id, it's deduced automatically from calling assembly name
It's should be unique per mod or there will be conflicts
You can set it to any string if you want.
Definition at line 124 of file CUI.cs.
|
staticget |
|
staticget |
|
staticgetset |
|
staticget |
|
staticgetset |
|
staticgetset |
|
staticget |
|
staticget |
Orchestrates Drawing and updates, there could be only one CUI.TopMain is located above vanilla GUI.
|
staticgetset |
|
staticgetset |
|
static |