initial text impl

This commit is contained in:
iris committed 2025-08-23 21:15:39 -04:00
1 parent abcbc267b5
commit 5ce6fca275
33 files changed
+530 -117

No files matched your search

+17
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(),
}
}