pub fn draw_rich_text<'a, I>(
position: Vector2,
size: f32,
font: Option<&Font>,
color: Color,
spans: I,
)Expand description
Draws a collection of Spans in sequence where each Span can have different properties such as
- text
- color
- size
- font
The
spansshould implement IntoIterator. Which means you can just pass an iterator.
ยงExamples
draw_rich_text(vec2(10.0, 10.0), &[
span("Hello there\n", WHITE),
span("My name is ", WHITE),
span("John Doe", RED)
.with_color(RED)
.with_size(32.0)
]);