Struct IPlayerTextDrawData
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
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
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
highlightColourThe highlight color to use during selection.
Bounds()
Gets the bounds of the pool.
public (Size, Size) Bounds()
Returns
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
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
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
otherIPlayerTextDrawData
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
Get(int)
Gets the element at the specified index.
public IPlayerTextDraw Get(int index)
Parameters
indexintThe 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
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
Lock(int)
Locks the element at the specified index.
public void Lock(int index)
Parameters
indexintThe index of the element to lock.
Release(int)
Releases the element at the specified index.
public void Release(int index)
Parameters
indexintThe index of the element to release.
Unlock(int)
Unlocks the element at the specified index.
public bool Unlock(int index)
Parameters
indexintThe index of the element to unlock.
Returns
Operators
operator ==(IPlayerTextDrawData, object?)
Determines whether the specified values are equal.
public static bool operator ==(IPlayerTextDrawData lhs, object? rhs)
Parameters
lhsIPlayerTextDrawDataThe 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 IPlayerTextDrawData(IExtension)
Casts the IExtension to a IPlayerTextDrawData.
public static explicit operator IPlayerTextDrawData(IExtension value)
Parameters
valueIExtensionThe IExtension to cast.
Returns
- IPlayerTextDrawData
The converted IPlayerTextDrawData.
explicit operator IExtension(IPlayerTextDrawData)
Casts the IPlayerTextDrawData to a IExtension.
public static explicit operator IExtension(IPlayerTextDrawData value)
Parameters
valueIPlayerTextDrawDataThe 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
valueIPlayerTextDrawDataThe 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
valueIPool<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
lhsIPlayerTextDrawDataThe 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; }