diff --git a/rust/sea_battle_cli_player/src/ui_screens/confirm_dialog_screen.rs b/rust/sea_battle_cli_player/src/ui_screens/confirm_dialog_screen.rs index 01b16d7..1f9bb4f 100644 --- a/rust/sea_battle_cli_player/src/ui_screens/confirm_dialog_screen.rs +++ b/rust/sea_battle_cli_player/src/ui_screens/confirm_dialog_screen.rs @@ -28,7 +28,7 @@ pub struct ConfirmDialogScreen<'a> { title: &'a str, msg: &'a str, is_confirm: bool, - can_cancel: bool, + can_escape: bool, } impl<'a> ConfirmDialogScreen<'a> { @@ -37,7 +37,7 @@ impl<'a> ConfirmDialogScreen<'a> { title: "Confirmation Request", msg, is_confirm: true, - can_cancel: false, + can_escape: false, } } @@ -56,7 +56,7 @@ impl<'a> ConfirmDialogScreen<'a> { if event::poll(timeout)? { if let Event::Key(key) = event::read()? { match key.code { - KeyCode::Esc | KeyCode::Char('q') if self.can_cancel => { + KeyCode::Esc | KeyCode::Char('q') if self.can_escape => { return Ok(ScreenResult::Canceled) }