mirror of
https://github.com/danbulant/cushy
synced 2026-05-27 05:42:43 +00:00
Reverting back to default app state
This commit is contained in:
parent
5a9aa6b55d
commit
5965f19d27
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ use gooey::{Run, WithClone};
|
||||||
use kludgine::figures::units::Lp;
|
use kludgine::figures::units::Lp;
|
||||||
|
|
||||||
fn main() -> gooey::Result {
|
fn main() -> gooey::Result {
|
||||||
let app = Dynamic::new(AppState::Winner(None));
|
let app = Dynamic::default();
|
||||||
app.map_each(app.with_clone(|app| {
|
app.map_each(app.with_clone(|app| {
|
||||||
move |state: &AppState| match state {
|
move |state: &AppState| match state {
|
||||||
AppState::Playing => play_screen(&app).make_widget(),
|
AppState::Playing => play_screen(&app).make_widget(),
|
||||||
|
|
@ -194,5 +194,6 @@ fn square(row: usize, column: usize, game: &Dynamic<GameState>) -> impl MakeWidg
|
||||||
.enabled(enabled)
|
.enabled(enabled)
|
||||||
.kind(ButtonKind::Outline)
|
.kind(ButtonKind::Outline)
|
||||||
.on_click(move |_| game.lock().play(row, column))
|
.on_click(move |_| game.lock().play(row, column))
|
||||||
|
.pad()
|
||||||
.expand()
|
.expand()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue