Chess: Use the hourglass cursor while waiting for the ChessEngine

This commit is contained in:
Tom 2020-12-22 11:47:32 -07:00 committed by Andreas Kling
parent a8f0e489a4
commit 99d6b3b80b

View file

@ -409,7 +409,9 @@ void ChessWidget::input_engine_move()
if (drag_was_enabled)
set_drag_enabled(false);
set_override_cursor(Gfx::StandardCursor::Wait);
m_engine->get_best_move(board(), 4000, [this, drag_was_enabled](Chess::Move move) {
set_override_cursor(Gfx::StandardCursor::None);
if (!want_engine_move())
return;
set_drag_enabled(drag_was_enabled);