pub fn new(mut allocator: impl ResourceAllocator<Path = P, Image = I>) -> Self {
        let mut builder = allocator.path_builder();
        builder.move_to(0.0, 0.0);
        builder.line_to(0.0, 1.0);
        builder.line_to(1.0, 1.0);
        builder.line_to(1.0, 0.0);
        builder.close();
        let rectangle = Handle::new(0, builder.finish(&mut allocator));

        Self {
            fonts: FontCache::new().unwrap(),
            icons: IconCache {
                game_icon: None,
                split_icons: Vec::new(),
                detailed_timer_icon: None,
            },
            // We use 0 for the rectangle.
            next_id: 1,
            scene: Scene::new(rectangle),
            cached_size: None,
        }
    }
/// Creates a new scene manager.
Creates a new scene manager.
Creates a new scene manager .
pub fn new(mut allocator: impl ResourceAllocator<Path = P, Image = I>) -> Self {
        let mut builder = allocator.path_builder();
        builder.move_to(0.0, 0.0);
        builder.line_to(0.0, 1.0);
        builder.line_to(1.0, 1.0);
        builder.line_to(1.0, 0.0);
        builder.close();
        let rectangle = Handle::new(0, builder.finish(&mut allocator));
        Self {
            fonts: FontCache::new().unwrap(),
            icons: IconCache {
                game_icon: None,
                split_icons: Vec::new(),
                detailed_timer_icon: None,
            },
            // We use 0 for the rectangle.
            next_id: 1,
            scene: Scene::new(rectangle),
            cached_size: None,
        }
    }
pub fn new ( mut allocator : impl ResourceAllocator < Path = P , Image = I > ) -> Self { let mut builder = allocator . path_builder ( ) ; builder . move_to ( 0.0 , 0.0 ) ; builder . line_to ( 0.0 , 1.0 ) ; builder . line_to ( 1.0 , 1.0 ) ; builder . line_to ( 1.0 , 0.0 ) ; builder . close ( ) ; let rectangle = Handle :: new ( 0 , builder . finish ( & mut allocator ) ) ; Self { fonts : FontCache :: new ( ) . unwrap ( ) , icons : IconCache { game_icon : None , split_icons : Vec :: new ( ) , detailed_timer_icon : None , } , // We use 0 for the rectangle. next_id : 1 , scene : Scene :: new ( rectangle ) , cached_size : None , } }
Creates a new scene manager.
Creates a new scene manager .
allocator
impl ResourceAllocator<Path = P, Image = I>
allocator
impl ResourceAllocator<Path = P, Image = I>