Skip to main content

Module textbox

Module textbox 

Source
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 character

Structs§

Textbox
a textbox component for rendering text on screen.
TypewriterState
state for typewriter animation.