todos and its requiriements

This commit is contained in:
leca 2024-04-12 09:33:22 +03:00
parent dc40fbff7b
commit b55d458722
3 changed files with 5025 additions and 10 deletions

View File

@ -29,3 +29,7 @@ I am not using Windows, so I have no idea how to install dependencies for it, fu
Application saves all data in %APPDATA%/learn-hieroglyph.
## Contributing
Contributing is welcome! Please, make an issue if you found a bug. Ideas are welcomed as well!
## Credits
Thanks to all my friends that was helping me with that!
Special thanks to https://github.com/schneems/united-dictionary for the eng-jp dictionary!

5000
japanese-english.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,11 @@
/*
TODOS:
1. remake db scheme for https://raw.githubusercontent.com/schneems/united-dictionary/master/public/languages/japanese/japanese-english.txt
2. parse it
3. add support for it
4. With incorrect answerd card, it shows hieroglyp, reading ant its translation
*/
mod db;
mod game;
mod ui;
@ -6,8 +14,8 @@ mod widgets;
use crate::ui::menu::MenuScene;
use gtk::glib::closure_local;
use gtk::{prelude::*, Window};
use gtk::{gio, glib, Application, Button};
use gtk::{prelude::*, Window};
use ui::cards::edit::MemoryCardsEditScene;
use ui::cards::game::MemoryCardsGameScene;
use ui::cards::setup::MemoryCardsSetupScene;
@ -77,7 +85,7 @@ fn build_ui(app: &Application) {
}
),
);
guessing_setup.get_start_button().connect_closure(
"clicked",
false,
@ -99,7 +107,7 @@ fn build_ui(app: &Application) {
}
),
);
guessing_scene.get_back_button().connect_closure(
"clicked",
false,
@ -109,7 +117,7 @@ fn build_ui(app: &Application) {
}
),
);
memory_cards_setup.get_edit_button().connect_closure(
"clicked",
false,
@ -161,7 +169,6 @@ fn build_ui(app: &Application) {
),
);
connect_close_requrest(app, menu.upcast_ref::<Window>());
connect_close_requrest(app, guessing_setup.upcast_ref::<Window>());
connect_close_requrest(app, guessing_scene.upcast_ref::<Window>());
@ -173,8 +180,12 @@ fn build_ui(app: &Application) {
}
fn connect_close_requrest<W: IsA<Window>>(app: &Application, w: &W) {
w.connect_closure("close-request", false, closure_local!(@strong app => move |_w: &Window| {
app.quit();
true
}));
}
w.connect_closure(
"close-request",
false,
closure_local!(@strong app => move |_w: &Window| {
app.quit();
true
}),
);
}