PlayerTextDraw

Struct PlayerTextDraw 

Source
pub struct PlayerTextDraw {
    pub player: Player,
    /* private fields */
}

Fields§

§player: Player

Implementations§

Source§

impl PlayerTextDraw

Source

pub fn get_handle(&self) -> *const c_void

Source

pub fn new(handle: *const c_void, player: Player) -> Self

Source

pub fn is_shown(&self) -> bool

Source

pub fn set_letter_size(&self, size: Vector2) -> bool

Source

pub fn set_text_size(&self, size: Vector2) -> bool

Source

pub fn alignment(&self, alignment: TextDrawAlignmentTypes) -> bool

Set the text alignment of a player-textdraw.

Source

pub fn color(&self, colour: Colour) -> bool

Sets the text color of a player-textdraw.

Source

pub fn use_box(&self, box_use: bool) -> bool

Toggle the box on a player-textdraw.

Source

pub fn set_box_color(&self, colour: Colour) -> bool

Source

pub fn set_shadow(&self, size: i32) -> bool

Adds a shadow to the bottom-right side of the text in a player-textdraw.

Source

pub fn set_outline(&self, size: i32) -> bool

Set the outline of a player-textdraw.

Source

pub fn background_color(&self, colour: Colour) -> bool

Adjust the background color of a player-textdraw.

Source

pub fn set_style(&self, font: TextDrawStyle) -> bool

Source

pub fn set_proportional(&self, set: bool) -> bool

Appears to scale text spacing to a proportional ratio.

Source

pub fn set_selectable(&self, set: bool) -> bool

Toggles whether a player-textdraw can be selected or not.

Source

pub fn show(&self) -> bool

Show a player-textdraw to the player it was created for.

Source

pub fn hide(&self) -> bool

Hide a player-textdraw from the player it was created for.

Source

pub fn set_string(&self, text: &str) -> bool

Change the text of a player-textdraw.

Source

pub fn set_preview_model(&self, model: i32) -> bool

Sets a player textdraw 3D preview sprite of a specified model ID.

Source

pub fn set_preview_rotation(&self, rotation: Vector3, zoom: f32) -> bool

Source

pub fn set_preview_veh_colour(&self, colour1: i32, colour2: i32) -> bool

Source

pub fn set_pos(&self, pos: Vector2) -> bool

Sets the position of a player-textdraw.

Source

pub fn get_string(&self) -> String

Gets the text of a player-textdraw.

Source

pub fn get_letter_size(&self) -> Vector2

Gets the width and height of the letters.

Source

pub fn get_text_size(&self) -> Vector2

Gets the X axis and Y axis of the player-textdraw text size.

Source

pub fn get_pos(&self) -> Vector2

Gets the position of a player-textdraw.

Source

pub fn get_color(&self) -> Colour

Gets the text color of a player-textdraw

Source

pub fn get_box_color(&self) -> Colour

Gets the box color of a player-textdraw

Source

pub fn get_background_colour(&self) -> Colour

Gets the background colour of a player-textdraw

Source

pub fn get_shadow(&self) -> i32

Get the shadow size on a player-textdraw.

Source

pub fn get_outline(&self) -> i32

Get the outline size on a player-textdraw.

Source

pub fn get_style(&self) -> i32

Source

pub fn is_box(&self) -> bool

Checks if a player-textdraw is box.

Source

pub fn is_proportional(&self) -> bool

Checks if a player-textdraw is proportional.

Source

pub fn is_selectable(&self) -> bool

Checks if a player-textdraw is selectable.

Source

pub fn get_alignment(&self) -> TextDrawAlignmentTypes

Gets the text alignment of a player-textdraw.

Source

pub fn get_preview_model(&self) -> i32

Gets the preview model of a 3D preview player-textdraw.

Source

pub fn get_preview_rotation(&self) -> (Vector3, f32)

Source

pub fn get_preview_veh_colour(&self) -> (i32, i32)

Source

pub fn get_id(&self) -> i32

Source

pub fn from_id(selfid: i32, player: &Player) -> Option<PlayerTextDraw>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.