mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 17:18:50 +00:00
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:
parent
ca47efba42
commit
dd89d71565
3 changed files with 70 additions and 32 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue