Table of Contents

Struct IPlayerTextDrawData

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

This type represents a pointer to an unmanaged open.mp IPlayerTextDrawData interface.

[OpenMpApi(new Type[] { typeof(IExtension), typeof(IPool<IPlayerTextDraw>) })]
public readonly struct IPlayerTextDrawData : IEquatable<IPlayerTextDrawData>, IPlayerTextDrawData.IManagedInterface, IExtension.IManagedInterface, IPool<IPlayerTextDraw>.IManagedInterface, IUnmanagedInterface
Implements
Inherited Members

Constructors

IPlayerTextDrawData(nint)

Initializes a new instance of the IPlayerTextDrawData struct.

public IPlayerTextDrawData(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

AsPool()

Gets the pool interface for managing player-specific text draws.

public IPool<IPlayerTextDraw> AsPool()

Returns

IPool<IPlayerTextDraw>

A pool interface for player-specific text draws.

BeginSelection(Colour)

Begins the selection of text draws for the player.

public void BeginSelection(Colour highlight)

Parameters

highlight Colour

The highlight color to use during selection.

Bounds()

Gets the bounds of the pool.

public (Size, Size) Bounds()

Returns

(Size, Size)

A tuple containing the lower and upper bounds of the pool.

Count()

Gets the number of elements in the pool.

public Size Count()

Returns

Size

The number of elements in the pool.

Create(Vector2, int)

Creates a new player-specific text draw with the specified position and preview model.

[OpenMpApiOverload("_model")]
public IPlayerTextDraw Create(Vector2 position, int model)

Parameters

position Vector2

The position of the text draw.

model int

The preview model of the text draw.

Returns

IPlayerTextDraw

The created player-specific text draw.

Create(Vector2, string)

Creates a new player-specific text draw with the specified position and text.

public IPlayerTextDraw Create(Vector2 position, string text)

Parameters

position Vector2

The position of the text draw.

text string

The text of the text draw.

Returns

IPlayerTextDraw

The created player-specific text draw.

EndSelection()

Ends the selection of text draws for the player.

public void EndSelection()

Equals(IPlayerTextDrawData)

public bool Equals(IPlayerTextDrawData other)

Parameters

other IPlayerTextDrawData

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

Get(int)

Gets the element at the specified index.

public IPlayerTextDraw Get(int index)

Parameters

index int

The index of the element to retrieve.

Returns

IPlayerTextDraw

The element at the specified index.

GetEnumerator()

Gets an enumerator that iterates through the pool.

public IPool<IPlayerTextDraw>.Enumerator GetEnumerator()

Returns

IPool<IPlayerTextDraw>.Enumerator

An enumerator for the pool.

GetHashCode()

public override int GetHashCode()

Returns

int

GetPoolEventDispatcher()

Gets the event dispatcher for the pool.

public IEventDispatcher<IPoolEventHandler<IPlayerTextDraw>> GetPoolEventDispatcher()

Returns

IEventDispatcher<IPoolEventHandler<IPlayerTextDraw>>

An IEventDispatcher<T> for handling pool events.

IsSelecting()

Determines whether the player is currently selecting text draws.

public bool IsSelecting()

Returns

bool

true if the player is selecting text draws; otherwise, false.

Lock(int)

Locks the element at the specified index.

public void Lock(int index)

Parameters

index int

The index of the element to lock.

Release(int)

Releases the element at the specified index.

public void Release(int index)

Parameters

index int

The index of the element to release.

Unlock(int)

Unlocks the element at the specified index.

public bool Unlock(int index)

Parameters

index int

The index of the element to unlock.

Returns

bool

true if the element was successfully unlocked; otherwise, false.

Operators

operator ==(IPlayerTextDrawData, object?)

Determines whether the specified values are equal.

public static bool operator ==(IPlayerTextDrawData lhs, object? rhs)

Parameters

lhs IPlayerTextDrawData

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 IPlayerTextDrawData(IExtension)

public static explicit operator IPlayerTextDrawData(IExtension value)

Parameters

value IExtension

The IExtension to cast.

Returns

IPlayerTextDrawData

The converted IPlayerTextDrawData.

explicit operator IExtension(IPlayerTextDrawData)

public static explicit operator IExtension(IPlayerTextDrawData value)

Parameters

value IPlayerTextDrawData

The IPlayerTextDrawData to cast.

Returns

IExtension

The converted IExtension.

explicit operator IPool<IPlayerTextDraw>(IPlayerTextDrawData)

Casts the IPlayerTextDrawData to a IPool<T>.

public static explicit operator IPool<IPlayerTextDraw>(IPlayerTextDrawData value)

Parameters

value IPlayerTextDrawData

The IPlayerTextDrawData to cast.

Returns

IPool<IPlayerTextDraw>

The converted IPool<T>.

explicit operator IPlayerTextDrawData(IPool<IPlayerTextDraw>)

Casts the IPool<T> to a IPlayerTextDrawData.

public static explicit operator IPlayerTextDrawData(IPool<IPlayerTextDraw> value)

Parameters

value IPool<IPlayerTextDraw>

The IPool<T> to cast.

Returns

IPlayerTextDrawData

The converted IPlayerTextDrawData.

operator !=(IPlayerTextDrawData, object?)

Determines whether the specified values are not equal.

public static bool operator !=(IPlayerTextDrawData lhs, object? rhs)

Parameters

lhs IPlayerTextDrawData

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