Table of Contents

Class Gui

Namespace
SharpPluginLoader.Core
Assembly
SharpPluginLoader.Core.dll

Exposes functionality related to the game's GUI.

public static class Gui
Inheritance
Gui
Inherited Members

Properties

SingletonInstance

The singleton instance of the sMhGUI class.

public static MtObject SingletonInstance { get; }

Property Value

MtObject

Methods

DisplayAlert(string)

public static void DisplayAlert(string message)

Parameters

message string

DisplayMessage(string, bool)

Displays a blue/purple message in the chat box.

public static void DisplayMessage(string message, bool isImportant = false)

Parameters

message string

The message to display

isImportant bool

Whether the message should be displayed in purple

DisplayMessage(string, TimeSpan, bool)

Displays a blue/purple message in the chat box.

public static void DisplayMessage(string message, TimeSpan delay, bool isImportant = false)

Parameters

message string

The message to display

delay TimeSpan

The delay before the message is displayed

isImportant bool

Whether the message should be displayed in purple

DisplayMessageWindow(string, Vector2)

public static void DisplayMessageWindow(string message, Vector2 offset = default)

Parameters

message string
offset Vector2

DisplayPopup(string, float, float)

Displays a popup message on the screen.

public static void DisplayPopup(string message, float xOff = 0, float yOff = 0)

Parameters

message string

The message to display

xOff float

The horizontal offset from the center of the screen

yOff float

The vertical offset from the center of the screen

DisplayPopup(string, TimeSpan, float, float)

Displays a popup message on the screen.

public static void DisplayPopup(string message, TimeSpan duration, float xOff = 0, float yOff = 0)

Parameters

message string

The message to display

duration TimeSpan

The duration for which the popup should be displayed

xOff float

The horizontal offset from the center of the screen

yOff float

The vertical offset from the center of the screen

DisplayPopup(string, TimeSpan, TimeSpan, float, float)

Displays a popup message on the screen.

public static void DisplayPopup(string message, TimeSpan duration, TimeSpan delay, float xOff = 0, float yOff = 0)

Parameters

message string

The message to display

duration TimeSpan

The duration for which the popup should be displayed

delay TimeSpan

The delay before the popup is displayed

xOff float

The horizontal offset from the center of the screen

yOff float

The vertical offset from the center of the screen

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