hUI/hui-painter/src/lib.rs

37 lines
673 B
Rust
Raw Normal View History

pub mod paint;
pub mod texture;
2024-09-21 09:28:47 -05:00
pub mod text;
pub mod util;
2024-08-04 11:06:49 -05:00
2024-09-21 20:02:29 -05:00
use text::FontManager;
2024-08-07 08:11:07 -05:00
use texture::TextureAtlas;
/// Painter instance, stores textures and fonts needed for rendering
2024-08-07 08:11:07 -05:00
#[derive(Default)]
pub struct PainterInstance {
2024-09-21 20:02:29 -05:00
pub atlas: TextureAtlas,
pub fonts: FontManager,
2024-08-07 08:11:07 -05:00
}
impl PainterInstance {
2024-08-07 08:11:07 -05:00
pub fn new() -> Self {
Self::default()
}
2024-08-04 11:06:49 -05:00
2024-09-21 20:02:29 -05:00
// pub fn atlas(&self) -> &TextureAtlas {
// &self.atlas
// }
// pub fn atlas_mut(&mut self) -> &mut TextureAtlas {
// &mut self.atlas
// }
// pub fn fonts(&self) -> &FontManager {
// &self.fonts
// }
// pub fn fonts_mut(&mut self) -> &mut FontManager {
// &mut self.fonts
// }
2024-08-04 11:06:49 -05:00
}