Struct amethyst_ui::UiText [−][src]
pub struct UiText { pub text: String, pub font_size: f32, pub color: [f32; 4], pub font: FontHandle, pub password: bool, // some fields omitted }
A component used to display text in this entity's UiTransform
Fields
text: String
The string rendered by this.
font_size: f32
The height of a line of text in pixels.
color: [f32; 4]
The color of the rendered text, using a range of 0.0 to 1.0 per channel.
font: FontHandle
The font used for rendering.
password: bool
If true this will be rendered as dots instead of the text.
Methods
impl UiText
[src]
impl UiText
pub fn new(
font: FontHandle,
text: String,
color: [f32; 4],
font_size: f32
) -> UiText
[src]
pub fn new(
font: FontHandle,
text: String,
color: [f32; 4],
font_size: f32
) -> UiText
Initializes a new UiText
Parameters
font
: A handle to aFont
assettext
: the glyphs to rendercolor
: RGBA color with a maximum of 1.0 and a minimum of 0.0 for each channelfont_size
: a uniform scale applied to the glyphs
Trait Implementations
impl Clone for UiText
[src]
impl Clone for UiText
fn clone(&self) -> UiText
[src]
fn clone(&self) -> UiText
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for UiText
[src]
impl Debug for UiText
fn fmt(&self, __f: &mut Formatter) -> Result
[src]
fn fmt(&self, __f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Component for UiText
[src]
impl Component for UiText
type Storage = DenseVecStorage<Self>
Associated storage type for this component.