Skip to content

Commit

Permalink
fix solved pause container show error
Browse files Browse the repository at this point in the history
  • Loading branch information
foxzool committed Dec 31, 2024
1 parent bb207da commit 2c27dcf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link data-trunk rel="copy-dir" href="assets"/>
<link data-trunk rel="copy-dir" href="credits"/>
<link data-trunk rel="copy-file" href="build/windows/icon.ico"/>
<link rel="icon" href="icon.ico">
<!-- <link rel="icon" href="icon.ico">-->
<link data-trunk rel="inline" href="build/web/styles.css"/>
</head>
<body>
Expand Down
13 changes: 7 additions & 6 deletions src/game/dialog.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::color::{DARK_BLACK, WHITE_COLOR};
use crate::game::{GameTimer, ResetPuzzle, Settings};
use crate::game::{GameTimer, ResetPuzzle, Settings, SudokuManager};
use crate::loading::{FontAssets, TextureAssets};
use crate::GameState;
use bevy::prelude::*;
Expand All @@ -11,10 +11,10 @@ pub(super) fn plugin(app: &mut App) {
(check_window_focus, fade_in_animation, fade_out_animation)
.run_if(in_state(GameState::Playing)),
)
.add_observer(on_pause_game)
.add_observer(on_show_settings)
.add_observer(on_show_congrats)
.add_observer(on_hint);
.add_observer(on_pause_game)
.add_observer(on_show_settings)
.add_observer(on_show_congrats)
.add_observer(on_hint);
}

pub(crate) fn dialog_container(_font_assets: &Res<FontAssets>, builder: &mut ChildBuilder) {
Expand Down Expand Up @@ -343,10 +343,11 @@ fn on_pause_game(
q_dialog: Single<(Entity, &mut Visibility), With<DialogContainer>>,
font_assets: Res<FontAssets>,
q_pause: Query<Entity, With<PauseContainer>>,
sudoku_manager: Res<SudokuManager>,
) {
let (entity, mut visibility) = q_dialog.into_inner();
if ev.event().0 {
if time.is_paused() {
if time.is_paused() || sudoku_manager.solved {
return;
}

Expand Down

0 comments on commit 2c27dcf

Please sign in to comment.