Expand description
textbox component for rendering text with typewriter animation
provides a Textbox component that can be attached to entities
for displaying text with optional typewriter-style animation.
§example
ⓘ
use lunar_render::textbox::{Textbox, TypewriterState};
use lunar_math::Vec2;
let mut textbox = Textbox::new("hello, world!", Vec2::new(100.0, 100.0), Vec2::new(400.0, 100.0));
textbox.set_font(0, 24.0);
textbox.start_typewriter(0.05); // 50ms per characterStructs§
- Textbox
- a textbox component for rendering text on screen.
- Typewriter
State - state for typewriter animation.