Struct MessageBoxButtonData
Structure representing a clickable option in an in-game message dialog.
Implements
Inherited Members
Namespace: SociallyDistant.Core.Shell.Windowing
Assembly: SociallyDistant.Framework.dll
Syntax
public struct MessageBoxButtonData : IEquatable<MessageBoxButtonData>
Constructors
MessageBoxButtonData(string, MessageDialogResult)
Creates a new MessageBoxButtonData value with the given message dialog result and button text.
Declaration
public MessageBoxButtonData(string text, MessageDialogResult result)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to be shown on the button. |
MessageDialogResult | result | The result to use when dismissing the dialog. |
MessageBoxButtonData(string, Action)
Creates a new MessageBoxButtonData based on text and a custom click callback.
Declaration
public MessageBoxButtonData(string text, Action clickHandler)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to be shown on the button. |
Action | clickHandler | The callback to execute when the button is clicked. |
Fields
ClickHandler
A custom callback delegate that will be called when this button is chosen.
Declaration
public readonly Action? ClickHandler
Field Value
Type | Description |
---|---|
Action |
Result
A MessageDialogResult value that will be used as the dismiss type when the dialog is dismissed by this button.
Declaration
public readonly MessageDialogResult Result
Field Value
Type | Description |
---|---|
MessageDialogResult |
See Also
Text
The text displayed on the button.
Declaration
public readonly string Text
Field Value
Type | Description |
---|---|
string |
Methods
Equals(MessageBoxButtonData)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(MessageBoxButtonData other)
Parameters
Type | Name | Description |
---|---|---|
MessageBoxButtonData | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |