Clone the context instead of repeating the same code

This commit is contained in:
reo 2025-09-05 16:07:48 +03:00
parent b3b69756e6
commit 1a200e62ef
2 changed files with 13 additions and 8 deletions

View file

@ -1,7 +1,16 @@
use std::cell::RefCell;
use std::rc::Rc;
use winit::event::Event;
use raidillon_assets::{ModelManagerRef, ModelManager};
// TODO: Find a way to move this to raidillon_platform as it belongs there.
// TODO: The name "Context" doesn't imply the wide role of this structure.
/// This provides a bridge between the game logic systems (raidillon_core::System) and
/// platform-related data/utilities.
#[derive(Clone)]
pub struct PlatformContext {
/// The latest winit event.
pub current_event: Event<()>,
pub asset_manager: ModelManagerRef,
pub frame_width: f32,