AGS: Engine: fixed non-blocking speech disabling interface

Apparently, this is an ancient bug, but it became noticeable
now after some changes to the GUI update logic fixes and
optimizations.

From upstream e069c3f51c08c163df023157e99e14bbcefd317a
This commit is contained in:
Walter Agazzi 2023-03-05 13:10:57 +01:00 committed by Eugene Sandulenko
parent 9a801a02fd
commit b554ab3bad

View File

@ -243,7 +243,12 @@ ScreenOverlay *_display_main(int xx, int yy, int wii, const char *text, int disp
// _display_main may be called even for custom textual overlays // _display_main may be called even for custom textual overlays
EndSkippingUntilCharStops(); EndSkippingUntilCharStops();
if (asspch > 0) { if (_GP(topBar).wantIt) {
// the top bar should behave like DisplaySpeech wrt blocking
disp_type = DISPLAYTEXT_SPEECH;
}
if ((asspch > 0) && (disp_type < DISPLAYTEXT_NORMALOVERLAY)) {
// update the all_buttons_disabled variable in advance // update the all_buttons_disabled variable in advance
// of the adjust_x/y_for_guis calls // of the adjust_x/y_for_guis calls
_GP(play).disabled_user_interface++; _GP(play).disabled_user_interface++;
@ -251,11 +256,6 @@ ScreenOverlay *_display_main(int xx, int yy, int wii, const char *text, int disp
_GP(play).disabled_user_interface--; _GP(play).disabled_user_interface--;
} }
if (_GP(topBar).wantIt) {
// the top bar should behave like DisplaySpeech wrt blocking
disp_type = DISPLAYTEXT_SPEECH;
}
// remove any previous blocking texts if necessary // remove any previous blocking texts if necessary
if (disp_type < DISPLAYTEXT_NORMALOVERLAY) if (disp_type < DISPLAYTEXT_NORMALOVERLAY)
remove_screen_overlay(_GP(play).text_overlay_on); remove_screen_overlay(_GP(play).text_overlay_on);