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
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
stringThe message to display
isImportant
boolWhether 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
stringThe message to display
delay
TimeSpanThe delay before the message is displayed
isImportant
boolWhether the message should be displayed in purple
DisplayMessageWindow(string, Vector2)
public static void DisplayMessageWindow(string message, Vector2 offset = default)
Parameters
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
stringThe message to display
xOff
floatThe horizontal offset from the center of the screen
yOff
floatThe 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
stringThe message to display
duration
TimeSpanThe duration for which the popup should be displayed
xOff
floatThe horizontal offset from the center of the screen
yOff
floatThe 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
stringThe message to display
duration
TimeSpanThe duration for which the popup should be displayed
delay
TimeSpanThe delay before the popup is displayed
xOff
floatThe horizontal offset from the center of the screen
yOff
floatThe 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
stringThe message to display
callback
DialogCallbackThe callback to call when the user clicks a button