Class PlayerTextDraw
Represents a component which provides the data and functionality of a per-player text draw.
public class PlayerTextDraw : IdProvider
- Inheritance
-
PlayerTextDraw
- Inherited Members
Constructors
PlayerTextDraw(IPlayerTextDrawData, IPlayerTextDraw)
Initializes a new instance of the PlayerTextDraw class.
protected PlayerTextDraw(IPlayerTextDrawData playerTextDraws, IPlayerTextDraw playerTextDraw)
Parameters
playerTextDrawsIPlayerTextDrawDataplayerTextDrawIPlayerTextDraw
Properties
Alignment
Gets or sets the alignment of this text draw.
public virtual TextDrawAlignment Alignment { get; set; }
Property Value
BackColor
Gets or sets the background Color of this text draw.
public virtual Color BackColor { get; set; }
Property Value
BoxColor
Gets or sets the Color of the box in this text draw.
public virtual Color BoxColor { get; set; }
Property Value
Font
Gets or sets the font of this text draw.
public virtual TextDrawFont Font { get; set; }
Property Value
ForeColor
Gets or sets the foreground Color of this text draw.
public virtual Color ForeColor { get; set; }
Property Value
IsOmpEntityDestroyed
Gets a value indicating whether the open.mp entity counterpart has been destroyed.
protected bool IsOmpEntityDestroyed { get; }
Property Value
LetterSize
Gets or sets the size of the letters in this text draw.
public virtual Vector2 LetterSize { get; set; }
Property Value
Outline
Gets or sets the outline size of this text draw.
public virtual int Outline { get; set; }
Property Value
Position
Gets or sets the position of this text draw.
public virtual Vector2 Position { get; set; }
Property Value
PreviewModel
Gets or sets the preview model ID displayed in this text draw.
public virtual int PreviewModel { get; set; }
Property Value
PreviewRotation
Gets or sets the preview model rotation of this text draw.
public virtual Vector3 PreviewRotation { get; set; }
Property Value
PreviewZoom
Gets the preview model zoom of this text draw.
public virtual float PreviewZoom { get; }
Property Value
Proportional
Gets or sets a value indicating whether the text of this text draw uses proportional spacing.
public virtual bool Proportional { get; set; }
Property Value
Selectable
Gets or sets a value indicating whether this text draw is selectable by the player.
public virtual bool Selectable { get; set; }
Property Value
Shadow
Gets or sets the shadow size of this text draw.
public virtual int Shadow { get; set; }
Property Value
Text
Gets or sets the text displayed in this text draw.
public virtual string Text { get; set; }
Property Value
TextSize
Gets or sets the size of this text draw box and clickable area.
public virtual Vector2 TextSize { get; set; }
Property Value
UseBox
Gets or sets a value indicating whether a box is displayed for this text draw.
public virtual bool UseBox { get; set; }
Property Value
Methods
Hide()
Hides this text draw for the player.
public virtual void Hide()
OnDestroyComponent()
This method is invoked before this component is destroyed and removed from its entity.
protected override void OnDestroyComponent()
Restream()
Forces this text draw to be re-sent to the player.
public virtual void Restream()
SetPreviewRotation(Vector3, float)
Sets the preview model rotation and zoom of this text draw.
public virtual void SetPreviewRotation(Vector3 rotation, float zoom = 1)
Parameters
SetPreviewVehicleColor(int, int)
Sets the preview vehicle colors of this text draw.
public virtual void SetPreviewVehicleColor(int color1, int color2)
Parameters
color1intThe primary color of the preview vehicle.
color2intThe secondary color of the preview vehicle.
Show()
Shows this text draw for the player.
public virtual void Show()
ToString()
public override string ToString()
Returns
Operators
implicit operator IPlayerTextDraw(PlayerTextDraw?)
Performs an implicit conversion from PlayerTextDraw to IPlayerTextDraw.
public static implicit operator IPlayerTextDraw(PlayerTextDraw? playerTextDraw)
Parameters
playerTextDrawPlayerTextDraw