1
0
Fork 0

Fix 51a7edd: NewGRF debug sprite picker was broken. (#14246)

pull/14250/head
frosch 2025-05-10 20:27:43 +02:00 committed by GitHub
parent a48a5f0cc6
commit c037722cb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 8 deletions

View File

@ -3026,14 +3026,6 @@ void InputLoop()
/* Process scheduled window deletion. */
Window::DeleteClosedWindows();
/* Handle sprite picker before any GUI interaction */
if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW) {
/* We are done with the last draw-frame, so we know what sprites we
* clicked on. Reset the picker mode and invalidate the window. */
_newgrf_debug_sprite_picker.mode = SPM_NONE;
InvalidateWindowData(WC_SPRITE_ALIGNER, 0, 1);
}
/* HandleMouseEvents was already called for this tick */
HandleMouseEvents();
}
@ -3117,6 +3109,13 @@ void UpdateWindows()
NetworkDrawChatMessage();
/* Redraw mouse cursor in case it was hidden */
DrawMouseCursor();
if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW) {
/* We are done with the last draw-frame, so we know what sprites we
* clicked on. Reset the picker mode and invalidate the window. */
_newgrf_debug_sprite_picker.mode = SPM_NONE;
InvalidateWindowData(WC_SPRITE_ALIGNER, 0, 1);
}
}
/**