mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
Chess: Make the resign button have no effect after the game ends
This commit is contained in:
parent
5a25082be5
commit
b7f4363791
1 changed files with 4 additions and 0 deletions
|
@ -680,6 +680,10 @@ void ChessWidget::flip_board()
|
||||||
|
|
||||||
int ChessWidget::resign()
|
int ChessWidget::resign()
|
||||||
{
|
{
|
||||||
|
// FIXME: Disable the resign checkbox if the game is finished
|
||||||
|
if (board().game_finished())
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (want_engine_move()) {
|
if (want_engine_move()) {
|
||||||
GUI::MessageBox::show(window(), "You can only resign on your turn."sv, "Resign"sv, GUI::MessageBox::Type::Information);
|
GUI::MessageBox::show(window(), "You can only resign on your turn."sv, "Resign"sv, GUI::MessageBox::Type::Information);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue