initial text impl

This commit is contained in:
2025-08-23 21:15:39 -04:00
parent abcbc267b5
commit 5ce6fca275
33 changed files with 530 additions and 117 deletions

17
src/core/text.rs Normal file
View File

@@ -0,0 +1,17 @@
use crate::prelude::*;
pub struct Text {
content: String,
}
impl<Ctx> Widget<Ctx> for Text {
fn draw(&self, painter: &mut Painter<Ctx>) {
painter.draw_text(&self.content);
}
}
pub fn text(text: impl Into<String>) -> Text {
Text {
content: text.into(),
}
}