mirror of
https://github.com/danbulant/cushy
synced 2026-05-24 12:28:23 +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;
|
||||
|
||||
fn main() -> gooey::Result {
|
||||
let app = Dynamic::new(AppState::Winner(None));
|
||||
let app = Dynamic::default();
|
||||
app.map_each(app.with_clone(|app| {
|
||||
move |state: &AppState| match state {
|
||||
AppState::Playing => play_screen(&app).make_widget(),
|
||||
|
|
@ -194,5 +194,6 @@ fn square(row: usize, column: usize, game: &Dynamic<GameState>) -> impl MakeWidg
|
|||
.enabled(enabled)
|
||||
.kind(ButtonKind::Outline)
|
||||
.on_click(move |_| game.lock().play(row, column))
|
||||
.pad()
|
||||
.expand()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue