Class RichHudClient
- Namespace
- RichHudFramework.Client
- Assembly
- RichHudClient.dll
API Client for the Rich HUD Framework.
This class handles the initialization and registration of a mod with the Rich HUD Master module.
public sealed class RichHudClient : RichHudComponentBase
- Inheritance
-
ModBase.ModuleBaseRichHudComponentBaseRichHudClient
Properties
Registered
Returns true if the client has been successfully registered with RichHudMaster.
Use this check (e.g., in Draw() or Update()) before accessing
framework members externally to ensure the mod client is registered.
public static bool Registered { get; }
Property Value
Methods
Init(string, Action, Action)
Initialzes and registers the client with the API if it is not already registered.
This method should be called on session Init (e.g., from MySessionComponentBase.Init())
of your main mod class.
Important: If your mod defines multiple session components, initialize the client from only one to ensure proper behavior.
public static void Init(string modName, Action InitCallback, Action ResetCallback)
Parameters
modNamestringName of the mod as it appears in the settings menu and in diagnostics.
InitCallbackActionInvoked upon successfully registering with the API. At this point, it is safe to start using the framework.
ResetCallbackActionInvoked on client reset (unregistered). This occurs when the game session is unloading, an unhandled exception is thrown on the client or master, or
RichHudClient.Reset()is called manually.
Reset()
Unregisters the client and resets all framework modules.
This is used if you are designing your mod to be reloadable during the game session, allowing you to reset the client before reinitializing your mod.
public static void Reset()