mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
Chess: Use the hourglass cursor while waiting for the ChessEngine
This commit is contained in:
parent
a8f0e489a4
commit
99d6b3b80b
Notes:
sideshowbarker
2024-07-19 00:39:59 +09:00
Author: https://github.com/tomuta
Commit: 99d6b3b80b
Pull-request: https://github.com/SerenityOS/serenity/pull/4501
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bcoles
1 changed files with 2 additions and 0 deletions
|
@ -409,7 +409,9 @@ void ChessWidget::input_engine_move()
|
||||||
if (drag_was_enabled)
|
if (drag_was_enabled)
|
||||||
set_drag_enabled(false);
|
set_drag_enabled(false);
|
||||||
|
|
||||||
|
set_override_cursor(Gfx::StandardCursor::Wait);
|
||||||
m_engine->get_best_move(board(), 4000, [this, drag_was_enabled](Chess::Move move) {
|
m_engine->get_best_move(board(), 4000, [this, drag_was_enabled](Chess::Move move) {
|
||||||
|
set_override_cursor(Gfx::StandardCursor::None);
|
||||||
if (!want_engine_move())
|
if (!want_engine_move())
|
||||||
return;
|
return;
|
||||||
set_drag_enabled(drag_was_enabled);
|
set_drag_enabled(drag_was_enabled);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue