implements PLN-0133

This commit is contained in:
2026-07-03 17:26:00 +01:00
parent f49accc796
commit badc9b8874
9 changed files with 308 additions and 6 deletions
@@ -1,4 +1,4 @@
use crate::{CrashReport, SystemOS};
use crate::{CrashReport, GameLibrary, SystemOS};
use prometeu_hal::color::Color;
use prometeu_hal::primitives::Rect;
use prometeu_hal::{
@@ -29,6 +29,7 @@ const COLOR_BUTTON_ACTIVE: Color = Color::rgb(72, 91, 122);
/// PrometeuHub: Launcher and system UI environment.
pub struct PrometeuHub {
home_input_armed: bool,
game_library: GameLibrary,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -91,13 +92,21 @@ impl Default for PrometeuHub {
impl PrometeuHub {
pub fn new() -> Self {
Self { home_input_armed: false }
Self { home_input_armed: false, game_library: GameLibrary::empty() }
}
pub fn init(&mut self) {
self.home_input_armed = false;
}
pub fn set_game_library(&mut self, game_library: GameLibrary) {
self.game_library = game_library;
}
pub fn game_library(&self) -> &GameLibrary {
&self.game_library
}
pub fn gui_update(
&mut self,
os: &mut SystemOS,