[−][src]Struct amethyst_ui::UiText
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.
line_mode: LineMode
How the text should handle new lines.
align: Anchor
How to align the text within its UiTransform
.
Methods
impl UiText
[src][−]
pub fn new(
font: FontHandle,
text: String,
color: [f32; 4],
font_size: f32
) -> UiText
[src][−]
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 Debug for UiText
[src][+]
impl Serialize for UiText
[src][+]
impl Component for UiText
[src]
type Storage = DenseVecStorage<Self>
Associated storage type for this component.
Auto Trait Implementations
impl Unpin for UiText
impl Sync for UiText
impl Send for UiText
impl UnwindSafe for UiText
impl RefUnwindSafe for UiText
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src][+]
SS: SubsetOf<SP>,
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any,
[src][+]
T: Any,
impl<T> Event for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src][+]
T: Serialize + ?Sized,
impl<T> Erased for T
[src]
impl<T> Clone for T where
T: Clone,
[src][+]
T: Clone,
impl<T> SetParameter for T
[src][+]
impl<T> Supports<T> for T
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src][+]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,