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
messagestring
DisplayMessage(string, bool)
Displays a blue/purple message in the chat box.
public static void DisplayMessage(string message, bool isImportant = false)
Parameters
messagestringThe message to display
isImportantboolWhether 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
messagestringThe message to display
delayTimeSpanThe delay before the message is displayed
isImportantboolWhether 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
messagestringThe message to display
xOfffloatThe horizontal offset from the center of the screen
yOfffloatThe 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
messagestringThe message to display
durationTimeSpanThe duration for which the popup should be displayed
xOfffloatThe horizontal offset from the center of the screen
yOfffloatThe 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
messagestringThe message to display
durationTimeSpanThe duration for which the popup should be displayed
delayTimeSpanThe delay before the popup is displayed
xOfffloatThe horizontal offset from the center of the screen
yOfffloatThe 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
messagestringThe message to display
callbackDialogCallbackThe callback to call when the user clicks a button