Struct three::Text
[−]
[src]
pub struct Text { /* fields omitted */ }
UI (on-screen) text.
To use, create the new one using Factory::ui_text
and add it to the scene using Scene::add
.
Methods
impl Text
[src]
fn set_text<S: Into<String>>(&mut self, text: S)
[src]
Change text.
fn set_font(&mut self, font: &Font)
[src]
Change font.
fn set_pos<P: Into<Point2<f32>>>(&mut self, point: P)
[src]
Change text position. Coordinates in pixels from top-left. Defaults to (0, 0).
fn set_size<V: Into<Vector2<f32>>>(&mut self, dimensions: V)
[src]
Change maximum bounds size, in pixels from top-left. Defaults to unbound.
fn set_color(&mut self, color: Color)
[src]
Change text color.
Defaults to white (0xFFFFFF
).
fn set_opacity(&mut self, opacity: f32)
[src]
Change text opacity.
From 0.0
to 1.0
.
Defaults to 1.0
.
fn set_font_size(&mut self, size: f32)
[src]
Change font size (scale). Defaults to 16.
fn set_layout(&mut self, layout: Layout)
[src]
Change text layout.
Defaults to Layout::SingleLine(Align::Left)
.
Trait Implementations
impl Clone for Text
[src]
fn clone(&self) -> Text
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Text
[src]
impl PartialEq for Text
[src]
fn eq(&self, __arg_0: &Text) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Text) -> bool
[src]
This method tests for !=
.
impl Eq for Text
[src]
impl Hash for Text
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl AsRef<Base> for Text
[src]
impl Object for Text
[src]
fn upcast(&self) -> Base
[src]
Converts into the base type.
fn set_visible(&self, visible: bool)
[src]
Invisible objects are not rendered by cameras.
fn set_transform<P, Q>(&self, pos: P, rot: Q, scale: f32) where
Self: Sized,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
[src]
Self: Sized,
P: Into<Point3<f32>>,
Q: Into<Quaternion<f32>>,
Set both position, orientation and scale.
fn set_position<P>(&self, pos: P) where
Self: Sized,
P: Into<Point3<f32>>,
[src]
Self: Sized,
P: Into<Point3<f32>>,
Set position.
fn set_orientation<Q>(&self, rot: Q) where
Self: Sized,
Q: Into<Quaternion<f32>>,
[src]
Self: Sized,
Q: Into<Quaternion<f32>>,
Set orientation.
fn set_scale(&self, scale: f32)
[src]
Set scale.
fn set_weights(&self, weights: Vec<f32>)
[src]
Set weights.
fn look_at<E, T>(&self, eye: E, target: T, up: Option<Vector3<f32>>) where
Self: Sized,
E: Into<Point3<f32>>,
T: Into<Point3<f32>>,
[src]
Self: Sized,
E: Into<Point3<f32>>,
T: Into<Point3<f32>>,
Rotates object in the specific direction of target
.