gtk window

This commit is contained in:
LunarAkai 2025-08-02 12:43:07 +02:00
commit 0c3a160dd5
12 changed files with 437 additions and 1714 deletions

View file

@ -1,22 +1,20 @@
//! Base functionality for a Moonhare Game Engine Project
use moonhare_log::*;
use moonhare_window::Window;
use crate::basic::game_window::GameWindow;
pub mod basic;
/// Only one Game may exist per project
#[derive(Debug)]
pub struct Game {
pub name: String,
pub primary_window: Option<GameWindow>,
}
impl Default for Game {
fn default() -> Self {
Self {
name: default_game_name(),
primary_window: None,
}
}
}
@ -35,10 +33,7 @@ impl Game {
pub fn add_window(&mut self) {
moonhare_log::info(format!("Adding window to {:?}", self));
if self.primary_window.is_none() {
moonhare_log::trace("Primary Window is none");
self.primary_window = Some(GameWindow::create());
}
Window::create();
}
}