Struct widgetry::text::Text [−][src]
Fields
lines: Vec<(Option<Color>, Vec<TextSpan>)>
bg_color: Option<Color>
Implementations
impl Text
[src]
impl Text
[src]pub fn new() -> Text
[src]
pub fn from_all(lines: Vec<TextSpan>) -> Text
[src]
pub fn from_multiline(lines: Vec<impl Into<TextSpan>>) -> Text
[src]
pub fn with_bg(self) -> Text
[src]
pub fn bg(self, bg: Color) -> Text
[src]
pub fn tooltip<MK: Into<Option<MultiKey>>>(
ctx: &EventCtx<'_>,
hotkey: MK,
action: &str
) -> Text
[src]
ctx: &EventCtx<'_>,
hotkey: MK,
action: &str
) -> Text
pub fn change_fg(self, fg: Color) -> Text
[src]
pub fn default_fg(self, fg: Color) -> Text
[src]
pub fn add_line(&mut self, line: impl Into<TextSpan>)
[src]
pub(crate) fn highlight_last_line(&mut self, highlight: Color)
[src]
pub fn append(&mut self, line: TextSpan)
[src]
pub fn add_appended(&mut self, lines: Vec<TextSpan>)
[src]
pub fn append_all(&mut self, lines: Vec<TextSpan>)
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn extend(&mut self, other: Text)
[src]
pub(crate) fn dims(self, assets: &Assets) -> ScreenDims
[src]
pub fn render<A: AsRef<Assets>>(self, assets: &A) -> GeomBatch
[src]
Render the text, without any autocropping. You can pass in an EventCtx
or GfxCtx
.
pub(crate) fn inner_render(self, assets: &Assets, tolerance: f32) -> GeomBatch
[src]
pub fn render_autocropped<A: AsRef<Assets>>(self, assets: &A) -> GeomBatch
[src]
Render the text, autocropping blank space out of the result. You can pass in an EventCtx
or GfxCtx
.