Gui

Namespace: SharpPluginLoader.Core

public static class Gui

Inheritance ObjectGui

Properties

SingletonInstance

The singleton instance of the sMhGUI class.

public static nint SingletonInstance { get; }

Property Value

IntPtr

Methods

DisplayPopup(String, Nullable<TimeSpan>, Nullable<TimeSpan>, Single, Single)

Displays a popup message on the screen.

public static void DisplayPopup(string message, Nullable<TimeSpan> duration, Nullable<TimeSpan> delay, float xOff, float yOff)

Parameters

message String
The message to display

duration Nullable<TimeSpan>
The duration for which the popup should be displayed

delay Nullable<TimeSpan>
The delay before the popup is displayed

xOff Single
The horizontal offset from the center of the screen

yOff Single
The vertical offset from the center of the screen

DisplayMessage(String, Nullable<TimeSpan>, Boolean)

Displays a blue/purple message in the chat box.

public static void DisplayMessage(string message, Nullable<TimeSpan> delay, bool isImportant)

Parameters

message String
The message to display

delay Nullable<TimeSpan>
The delay before the message is displayed

isImportant Boolean
Whether the message should be displayed in purple

DisplayYesNoDialog(String, DialogCallback)

Displays a prompt with a yes/no/cancel button. The callback will be called when the user clicks a button. Note: The user is responsible for keeping the callback alive.

public static void DisplayYesNoDialog(string message, DialogCallback callback)

Parameters

message String
The message to display

callback DialogCallback
The callback to call when the user clicks a button

DisplayMessageWindow(String, MtVector2)

public static void DisplayMessageWindow(string message, MtVector2 offset)

Parameters

message String

offset MtVector2

DisplayAlert(String)

public static void DisplayAlert(string message)

Parameters

message String