Table of Contents

Struct IPlayerDialogData

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

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

handle nint

A pointer to the unmanaged interface.

Properties

Handle

Gets the handle to the unmanaged interface instance.

public nint Handle { get; }

Property Value

nint

HasValue

Gets a value indicating whether the pointer has a value.

public bool HasValue { get; }

Property Value

bool

Methods

Equals(IPlayerDialogData)

public bool Equals(IPlayerDialogData other)

Parameters

other IPlayerDialogData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

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

id int

When the method returns, contains the ID of the dialog.

style DialogStyle

When the method returns, contains the style of the dialog.

title string

When the method returns, contains the title of the dialog.

body string

When the method returns, contains the body text of the dialog.

button1 string

When the method returns, contains the text of the first button.

button2 string

When 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

int

Hide(IPlayer)

Hides any dialog currently shown to the player.

public void Hide(IPlayer player)

Parameters

player IPlayer

The 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

player IPlayer

The player to show the dialog to.

id int

The ID of the dialog.

style DialogStyle

The style/type of dialog.

title string

The title of the dialog.

body string

The body/content text of the dialog.

button1 string

The text for the first (right) button.

button2 string

The 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

lhs IPlayerDialogData

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are equal; otherwise, false.

explicit operator IPlayerDialogData(IExtension)

Casts the IExtension to a IPlayerDialogData.

public static explicit operator IPlayerDialogData(IExtension value)

Parameters

value IExtension

The 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

value IPlayerDialogData

The 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

lhs IPlayerDialogData

The value on the left side of the operator.

rhs object

The value on the right side of the operator.

Returns

bool

true if the values are not equal; otherwise, false.

Explicit Interface Implementations

ExtensionId

Gets the identifier of the extension type. IPool<T>

static UID ExtensionId { get; }

Returns

UID