pub struct TextDraw { /* private fields */ }Implementations§
Source§impl TextDraw
impl TextDraw
pub fn get_handle(&self) -> *const c_void
pub fn new(handle: *const c_void) -> Self
pub fn is_shown_for_player(&self, player: &Player) -> bool
pub fn set_letter_size(&self, size: Vector2) -> bool
pub fn set_text_size(&self, size: Vector2) -> bool
pub fn set_alignment(&self, alignment: TextDrawAlignmentTypes) -> bool
pub fn set_color(&self, colour: Colour) -> bool
pub fn set_box_color(&self, colour: Colour) -> bool
Sourcepub fn set_shadow(&self, size: i32) -> bool
pub fn set_shadow(&self, size: i32) -> bool
Sets the size of a textdraw’s text’s shadow.
Sourcepub fn set_outline(&self, size: i32) -> bool
pub fn set_outline(&self, size: i32) -> bool
Sets the thickness of a textdraw’s text’s outline.
pub fn set_background_color(&self, colour: Colour) -> bool
pub fn set_style(&self, font: TextDrawStyle) -> bool
Sourcepub fn set_proportional(&self, set: bool) -> bool
pub fn set_proportional(&self, set: bool) -> bool
Appears to scale text spacing to a proportional ratio.
Sourcepub fn set_selectable(&self, set: bool) -> bool
pub fn set_selectable(&self, set: bool) -> bool
Sets whether a textdraw can be selected (clicked on) or not.
Sourcepub fn show_for_player(&self, player: &Player) -> bool
pub fn show_for_player(&self, player: &Player) -> bool
Shows a textdraw for a specific player.
Sourcepub fn hide_for_player(&self, player: &Player) -> bool
pub fn hide_for_player(&self, player: &Player) -> bool
Hides a textdraw for a specific player.
Sourcepub fn show_for_all(&self) -> bool
pub fn show_for_all(&self) -> bool
Shows a textdraw for all players.
Sourcepub fn hide_for_all(&self) -> bool
pub fn hide_for_all(&self) -> bool
Hides a text draw for all players.
Sourcepub fn set_string(&self, text: &str) -> bool
pub fn set_string(&self, text: &str) -> bool
Changes the text on a textdraw.
Sourcepub fn set_preview_model(&self, model: i32) -> bool
pub fn set_preview_model(&self, model: i32) -> bool
Set the model for a textdraw model preview.
pub fn set_preview_rotation(&self, rotation: Vector3, zoom: f32) -> bool
pub fn set_preview_veh_colour(&self, colour1: i32, colour2: i32) -> bool
Sourcepub fn get_string(&self) -> String
pub fn get_string(&self) -> String
Gets the text of a textdraw.
Sourcepub fn get_letter_size(&self) -> Vector2
pub fn get_letter_size(&self) -> Vector2
Gets the width and height of the letters.
Sourcepub fn get_text_size(&self) -> Vector2
pub fn get_text_size(&self) -> Vector2
Gets the X axis and Y axis of the textdraw.
Sourcepub fn get_box_color(&self) -> Colour
pub fn get_box_color(&self) -> Colour
Gets the box color of a textdraw.
Sourcepub fn get_background_color(&self) -> Colour
pub fn get_background_color(&self) -> Colour
Gets the background color of a textdraw.
Sourcepub fn get_shadow(&self) -> i32
pub fn get_shadow(&self) -> i32
Gets the size of a textdraw’s text’s shadow.
Sourcepub fn get_outline(&self) -> i32
pub fn get_outline(&self) -> i32
Gets the thickness of a textdraw’s text’s outline.
pub fn get_style(&self) -> i32
Sourcepub fn is_proportional(&self) -> bool
pub fn is_proportional(&self) -> bool
Checks if a textdraw is proportional.
Sourcepub fn is_selectable(&self) -> bool
pub fn is_selectable(&self) -> bool
Checks if a textdraw is selectable.
Sourcepub fn get_alignment(&self) -> TextDrawAlignmentTypes
pub fn get_alignment(&self) -> TextDrawAlignmentTypes
Gets the text alignment of a textdraw.
Sourcepub fn get_preview_model(&self) -> i32
pub fn get_preview_model(&self) -> i32
Gets the preview model of a 3D preview textdraw.
pub fn get_preview_rotation(&self) -> (Vector3, f32)
pub fn get_preview_veh_colour(&self) -> (i32, i32)
Sourcepub fn set_string_for_player(&self, player: &Player, text: &str) -> bool
pub fn set_string_for_player(&self, player: &Player, text: &str) -> bool
Changes the text on a textdraw for a specific player.