added small animations

This commit is contained in:
Nilton Constantino
2026-01-16 16:40:59 +00:00
parent 4e278b29bd
commit b43d046433
11 changed files with 278 additions and 123 deletions
@@ -19,12 +19,14 @@ impl WindowSystem {
/// PrometeuHub: Launcher e ambiente de UI do sistema.
pub struct PrometeuHub {
pub window_system: WindowSystem,
pub color: Color,
}
impl PrometeuHub {
pub fn new() -> Self {
Self {
window_system: WindowSystem::new(),
color: Color::BLACK,
}
}
@@ -32,8 +34,21 @@ impl PrometeuHub {
// Inicializa o Window System e lista apps
}
pub fn gui_update(&mut self, _os: &mut PrometeuOS) {
// Atualiza a UI do Window System
pub fn gui_update(&mut self, os: &mut PrometeuOS, hw: &mut dyn HardwareBridge) {
if hw.pad().a.down {
self.color = Color::GREEN;
}
if hw.pad().b.down {
self.color = Color::INDIGO;
}
if hw.pad().x.down {
self.color = Color::YELLOW;
}
if hw.pad().y.down {
self.color = Color::RED;
}
hw.gfx_mut().clear(self.color);
}
pub fn render(&mut self, _os: &mut PrometeuOS, _hw: &mut dyn HardwareBridge) {