learn-hieroglyphs/src/main.rs

27 lines
581 B
Rust
Raw Normal View History

2024-03-22 15:59:42 +03:00
mod game;
2024-03-27 11:27:15 +03:00
mod ui;
mod widgets;
2024-03-22 15:59:42 +03:00
2024-04-01 15:42:50 +03:00
use crate::ui::menu::MenuScene;
2024-03-27 11:27:15 +03:00
2024-04-02 15:32:43 +03:00
use gtk::{gio, glib, Application};
2024-04-01 15:42:50 +03:00
use gtk::{prelude::*, ApplicationWindow};
2024-03-22 15:59:42 +03:00
2024-03-25 05:20:18 +03:00
const APP_ID: &str = "org.foxarmy.learn-hieroglyph";
2024-04-01 23:46:13 +03:00
2024-03-22 15:59:42 +03:00
fn main() -> glib::ExitCode {
2024-04-02 15:32:43 +03:00
gio::resources_register_include!("compiled.gresource").expect("Cannot include gresources");
2024-04-01 15:42:50 +03:00
let app: Application = Application::builder().application_id(APP_ID).build();
app.connect_activate(test_ui);
2024-03-22 15:59:42 +03:00
app.run()
}
2024-04-01 15:42:50 +03:00
2024-04-02 15:32:43 +03:00
fn test_ui(app: &Application) {
2024-04-01 15:42:50 +03:00
let window: ApplicationWindow = MenuScene::new(app).into();
2024-04-01 23:46:13 +03:00
window.present();
2024-04-01 15:42:50 +03:00
}