update building

This commit is contained in:
2024-04-01 23:46:13 +03:00
parent 5bd625add4
commit 9bb20dcc32
26 changed files with 140 additions and 50 deletions

0
src/ui/cards/edit/imp.rs Normal file
View File

0
src/ui/cards/edit/mod.rs Normal file
View File

0
src/ui/cards/game/imp.rs Normal file
View File

0
src/ui/cards/game/mod.rs Normal file
View File

View File

@@ -1,17 +1,3 @@
mod imp;
use glib::Object;
use gtk::{gio, glib, Application};
glib::wrapper! {
pub struct MemoryCardsSetupScene(ObjectSubclass<imp::MemoryCardsSetupScene>)
@extends gtk::ApplicationWindow, gtk::Window, gtk::Widget,
@implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
}
impl MemoryCardsSetupScene {
pub fn new(app: &Application) -> Self {
Object::builder().property("application", app).build()
}
}
pub mod edit;
pub mod game;
pub mod settings;

View File

@@ -4,7 +4,7 @@ use gtk::{glib, Button, CompositeTemplate};
#[derive(CompositeTemplate, Default)]
#[template(resource = "/org/foxarmy/learn-hieroglyph/memory_cards_settings.ui.xml")]
#[template(resource = "/org/foxarmy/learn-hieroglyph/cards/settings/ui.xml")]
pub struct MemoryCardsSetupScene {
#[template_child]
pub edit_button: TemplateChild<Button>,

View File

@@ -0,0 +1,17 @@
mod imp;
use glib::Object;
use gtk::{gio, glib, Application};
glib::wrapper! {
pub struct MemoryCardsSetupScene(ObjectSubclass<imp::MemoryCardsSetupScene>)
@extends gtk::ApplicationWindow, gtk::Window, gtk::Widget,
@implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
}
impl MemoryCardsSetupScene {
pub fn new(app: &Application) -> Self {
Object::builder().property("application", app).build()
}
}

View File

@@ -13,7 +13,7 @@ use rand::Rng;
#[derive(CompositeTemplate, Default)]
#[template(resource = "/org/foxarmy/learn-hieroglyph/guessing.ui.xml")]
#[template(resource = "/org/foxarmy/learn-hieroglyph/guessing/game/ui.xml")]
pub struct GuessingScene {
#[template_child]
pub question_label: TemplateChild<Label>,

View File

@@ -0,0 +1,17 @@
mod imp;
use glib::Object;
use gtk::{gio, glib, Application};
glib::wrapper! {
pub struct GuessingScene(ObjectSubclass<imp::GuessingScene>)
@extends gtk::ApplicationWindow, gtk::Window, gtk::Widget,
@implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
}
impl GuessingScene {
pub fn new(app: &Application) -> Self {
Object::builder().property("application", app).build()
}
}

View File

@@ -1,17 +1,2 @@
mod imp;
use glib::Object;
use gtk::{gio, glib, Application};
glib::wrapper! {
pub struct GuessingScene(ObjectSubclass<imp::GuessingScene>)
@extends gtk::ApplicationWindow, gtk::Window, gtk::Widget,
@implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
}
impl GuessingScene {
pub fn new(app: &Application) -> Self {
Object::builder().property("application", app).build()
}
}
pub mod settings;
pub mod game;

View File

View File

View File

@@ -1,4 +1,4 @@
use crate::ui::{guessing::GuessingScene, cards::MemoryCardsSetupScene};
use crate::ui::{guessing::game::GuessingScene, cards::settings::MemoryCardsSetupScene};
use glib::subclass::InitializingObject;
use gtk::glib::closure_local;
@@ -6,7 +6,7 @@ use gtk::subclass::prelude::*;
use gtk::{glib, prelude::*, Box, Button, CompositeTemplate};
#[derive(CompositeTemplate, Default)]
#[template(resource = "/org/foxarmy/learn-hieroglyph/menu.ui.xml")]
#[template(resource = "/org/foxarmy/learn-hieroglyph/menu/ui.xml")]
pub struct MenuScene {
#[template_child]
pub content: TemplateChild<Box>,