From: Holger Schemel Date: Sat, 2 Dec 2023 10:42:24 +0000 (+0100) Subject: added showing game actions after game end when request envelope opens/closes X-Git-Tag: 4.3.8.0~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8b1c89610ce8f31d4ff571b96811fa68f62a89c6;p=rocksndiamonds.git added showing game actions after game end when request envelope opens/closes --- diff --git a/src/tools.c b/src/tools.c index f7fc34a2..8a8924e3 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3255,6 +3255,8 @@ static void DrawEnvelopeRequest(char *text, unsigned int req_state) static void AnimateEnvelopeRequest(int anim_mode, int action) { + boolean game_just_ended = (game_status == GAME_MODE_PLAYING && + checkGameEnded()); int delay_value_normal = request.step_delay; int delay_value_fast = delay_value_normal / 2; boolean ffwd_delay = (tape.playing && tape.fast_forward); @@ -3303,6 +3305,9 @@ static void AnimateEnvelopeRequest(int anim_mode, int action) int dst_x, dst_y; int xx, yy; + if (game_just_ended) + HandleGameActions(); + setRequestPosition(&src_x, &src_y, FALSE); setRequestPositionExt(&dst_x, &dst_y, width, height, FALSE); @@ -4504,10 +4509,6 @@ static int RequestHandleEvents(unsigned int req_state, int draw_buffer_game) int sx, sy; int result; - // when showing request dialog after game ended, deactivate game panel - if (game_just_ended) - game.panel.active = FALSE; - setRequestPosition(&sx, &sy, FALSE); button_status = MB_RELEASED; @@ -5082,9 +5083,15 @@ static boolean RequestEnvelope(char *text, unsigned int req_state) boolean Request(char *text, unsigned int req_state) { + boolean game_just_ended = (game_status == GAME_MODE_PLAYING && + checkGameEnded()); boolean overlay_enabled = GetOverlayEnabled(); boolean result; + // when showing request dialog after game ended, deactivate game panel + if (game_just_ended) + game.panel.active = FALSE; + game.request_active = TRUE; SetOverlayEnabled(FALSE);