Show a list of games in the library #64
|
@ -910,7 +910,7 @@ dependencies = [
|
||||||
"gdk4",
|
"gdk4",
|
||||||
"gio",
|
"gio",
|
||||||
"glib",
|
"glib",
|
||||||
"glib-build-tools",
|
"glib-build-tools 0.16.3",
|
||||||
"gtk4",
|
"gtk4",
|
||||||
"libadwaita",
|
"libadwaita",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
use crate::{
|
use crate::ui::{home, library_view, HomeView, LibraryView};
|
||||||
ui::types;
|
|
||||||
};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use typeshare::typeshare;
|
use typeshare::typeshare;
|
||||||
|
|
||||||
|
#[typeshare]
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub enum LaunchScreenView {
|
pub struct LaunchScreenView {
|
||||||
CreateGame(CreateGameView)
|
home: HomeView,
|
||||||
|
library: LibraryView,
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will be called when the Kifu application starts.
|
// This will be called when the Kifu application starts.
|
||||||
pub fn launch_screen() -> LaunchScreenView {
|
pub fn launch_screen_view() -> LaunchScreenView {
|
||||||
|
LaunchScreenView {
|
||||||
|
home: home(vec![].into_iter()),
|
||||||
|
library: library_view(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
use typeshare::typeshare;
|
||||||
|
|
||||||
|
#[typeshare]
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct LibraryView;
|
||||||
|
|
||||||
|
pub fn library_view() -> LibraryView {
|
||||||
|
LibraryView
|
||||||
|
}
|
|
@ -4,8 +4,11 @@ pub use elements::{action::Action, game_preview::GamePreviewElement, menu::Menu}
|
||||||
mod playing_field;
|
mod playing_field;
|
||||||
pub use playing_field::{playing_field, PlayingFieldView};
|
pub use playing_field::{playing_field, PlayingFieldView};
|
||||||
|
|
||||||
// mod launch_screen;
|
mod launch_screen;
|
||||||
// pub use launch_screen::{launch_screen, LaunchScreenView};
|
pub use launch_screen::{launch_screen_view, LaunchScreenView};
|
||||||
|
|
||||||
|
mod library_view;
|
||||||
|
pub use library_view::{library_view, LibraryView};
|
||||||
|
|
||||||
mod home;
|
mod home;
|
||||||
pub use home::{home, HomeView, HotseatPlayerElement, PlayerElement};
|
pub use home::{home, HomeView, HotseatPlayerElement, PlayerElement};
|
||||||
|
|
Loading…
Reference in New Issue