pub struct TextLabel { /* private fields */ }Implementations§
Source§impl TextLabel
impl TextLabel
pub fn get_handle(&self) -> *const c_void
pub fn new(handle: *const c_void) -> Self
Sourcepub fn create(
text: &str,
colour: Colour,
position: Vector3,
drawDistance: f32,
virtualWorld: i32,
los: bool,
) -> Option<TextLabel>
pub fn create( text: &str, colour: Colour, position: Vector3, drawDistance: f32, virtualWorld: i32, los: bool, ) -> Option<TextLabel>
Creates a 3D Text Label at a specific location in the world.
Sourcepub fn attach_to_player(&self, player: &Player, offset: Vector3) -> bool
pub fn attach_to_player(&self, player: &Player, offset: Vector3) -> bool
Attach a 3D text label to a player.
Sourcepub fn attach_to_vehicle(&self, vehicle: &Vehicle, offset: Vector3) -> bool
pub fn attach_to_vehicle(&self, vehicle: &Vehicle, offset: Vector3) -> bool
Attaches a 3D Text Label to a specific vehicle.
Sourcepub fn update_text(&self, colour: Colour, text: &str) -> bool
pub fn update_text(&self, colour: Colour, text: &str) -> bool
Updates a 3D Text Label text and color.
Sourcepub fn is_streamed_in(&self, player: &Player) -> bool
pub fn is_streamed_in(&self, player: &Player) -> bool
Checks if a 3D text label is streamed in for a player.
Sourcepub fn set_draw_distance(&self, distance: f32) -> bool
pub fn set_draw_distance(&self, distance: f32) -> bool
Sets the 3D text label draw distance.
Sourcepub fn get_draw_distance(&self) -> f32
pub fn get_draw_distance(&self) -> f32
Gets the 3D text label draw distance.
Sourcepub fn get_virtual_world(&self) -> i32
pub fn get_virtual_world(&self) -> i32
Gets the 3D text label virtual world id.
Sourcepub fn set_virtual_world(&self, world: i32) -> bool
pub fn set_virtual_world(&self, world: i32) -> bool
Sets the 3D text label virtual world id.
Sourcepub fn get_attached_data(&self) -> TextLabelAttachmentData
pub fn get_attached_data(&self) -> TextLabelAttachmentData
Gets the 3D text label attached data.
pub fn get_id(&self) -> i32
pub fn from_id(id: i32) -> Option<TextLabel>
Auto Trait Implementations§
impl Freeze for TextLabel
impl RefUnwindSafe for TextLabel
impl !Send for TextLabel
impl !Sync for TextLabel
impl Unpin for TextLabel
impl UnwindSafe for TextLabel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more