feat(renderer2d)!: made text rendering return the bounds of the rendered text for better position control but also changed render_scene_2d signature to take a mutable Scene reference

This commit is contained in:
lisk77 2025-10-25 21:38:14 +02:00
parent ca47efba42
commit dd89d71565
3 changed files with 70 additions and 32 deletions

View file

@ -508,6 +508,14 @@ impl Text {
pub fn is_visible(&self) -> bool {
self.is_visible
}
pub fn bounds(&self) -> v2 {
self.bounds
}
pub fn set_bounds(&mut self, bounds: v2) {
self.bounds = bounds
}
}
impl Color {