Struct IPlayerDialogData
This type represents a pointer to an unmanaged open.mp IPlayerDialogData interface.
[OpenMpApi(new Type[] { typeof(IExtension) })]
public readonly struct IPlayerDialogData : IEquatable<IPlayerDialogData>, IPlayerDialogData.IManagedInterface, IExtension.IManagedInterface, IUnmanagedInterface
- Implements
- Inherited Members
Constructors
IPlayerDialogData(nint)
Initializes a new instance of the IPlayerDialogData struct.
public IPlayerDialogData(nint handle)
Parameters
handlenintA pointer to the unmanaged interface.
Properties
Handle
Gets the handle to the unmanaged interface instance.
public nint Handle { get; }
Property Value
HasValue
Gets a value indicating whether the pointer has a value.
public bool HasValue { get; }
Property Value
Methods
Equals(IPlayerDialogData)
public bool Equals(IPlayerDialogData other)
Parameters
otherIPlayerDialogData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
Get(out int, out DialogStyle, out string?, out string?, out string?, out string?)
Gets the information of the current dialog shown to the player.
public void Get(out int id, out DialogStyle style, out string? title, out string? body, out string? button1, out string? button2)
Parameters
idintWhen the method returns, contains the ID of the dialog.
styleDialogStyleWhen the method returns, contains the style of the dialog.
titlestringWhen the method returns, contains the title of the dialog.
bodystringWhen the method returns, contains the body text of the dialog.
button1stringWhen the method returns, contains the text of the first button.
button2stringWhen the method returns, contains the text of the second button.
GetActiveID()
Gets the ID of the currently active dialog for the player.
public int GetActiveID()
Returns
- int
The ID of the active dialog, or -1 if no dialog is active.
GetHashCode()
public override int GetHashCode()
Returns
Hide(IPlayer)
Hides any dialog currently shown to the player.
public void Hide(IPlayer player)
Parameters
playerIPlayerThe player to hide the dialog for.
Show(IPlayer, int, DialogStyle, string, string, string, string)
Shows a dialog to the player.
public void Show(IPlayer player, int id, DialogStyle style, string title, string body, string button1, string button2)
Parameters
playerIPlayerThe player to show the dialog to.
idintThe ID of the dialog.
styleDialogStyleThe style/type of dialog.
titlestringThe title of the dialog.
bodystringThe body/content text of the dialog.
button1stringThe text for the first (right) button.
button2stringThe text for the second (left) button.
Operators
operator ==(IPlayerDialogData, object?)
Determines whether the specified values are equal.
public static bool operator ==(IPlayerDialogData lhs, object? rhs)
Parameters
lhsIPlayerDialogDataThe value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are equal; otherwise,false.
explicit operator IPlayerDialogData(IExtension)
Casts the IExtension to a IPlayerDialogData.
public static explicit operator IPlayerDialogData(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- IPlayerDialogData
The converted IPlayerDialogData.
explicit operator IExtension(IPlayerDialogData)
Casts the IPlayerDialogData to a IExtension.
public static explicit operator IExtension(IPlayerDialogData value)
Parameters
valueIPlayerDialogDataThe IPlayerDialogData to cast.
Returns
- IExtension
The converted IExtension.
operator !=(IPlayerDialogData, object?)
Determines whether the specified values are not equal.
public static bool operator !=(IPlayerDialogData lhs, object? rhs)
Parameters
lhsIPlayerDialogDataThe value on the left side of the operator.
rhsobjectThe value on the right side of the operator.
Returns
- bool
trueif the values are not equal; otherwise,false.
Explicit Interface Implementations
ExtensionId
Gets the identifier of the extension type. IPool<T>
static UID ExtensionId { get; }