pub struct Text {
pub font: Option<String>,
pub string_table: Option<String>,
pub text: String,
pub shadow: bool,
pub wrap: bool,
pub max_width: i32,
pub justify: u32,
pub ellipsis_width: i32,
}Expand description
A text element’s description.
Fields§
§font: Option<String>The font.
string_table: Option<String>The string table that text is a key of.
text: StringString-table key, or literal text when no table is given.
shadow: boolDraw a black shadow one pixel down and right (TextElement::Draw).
wrap: boolWhether long lines wrap.
max_width: i32Width limit passed to Font::ComputeStringLayout (wrapping / ellipsis).
justify: u32Font::Justify: 0 left, 1 centre, 2 right.
ellipsis_width: i32Non-wrapped line width at which the engine inserts “…”. This is not a key code.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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