From f8c5cdb37a9f39b4f5d16ebce2d36e4a6759edd8 Mon Sep 17 00:00:00 2001 From: Mauller <26652186+Mauller@users.noreply.github.com> Date: Tue, 13 May 2025 18:51:01 +0100 Subject: [PATCH 1/2] [GEN][ZH] Allow command bar to be minimised during replays (#) --- .../GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp | 2 -- .../GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index 5e1d32956ec..07c3250ada6 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -2982,8 +2982,6 @@ void ControlBar::switchControlBarStage( ControlBarStages stage ) { if(stage < CONTROL_BAR_STAGE_DEFAULT || stage >= MAX_CONTROL_BAR_STAGES) return; - if (TheRecorder && TheRecorder->getMode() == RECORDERMODETYPE_PLAYBACK) - return; switch (stage) { case CONTROL_BAR_STAGE_DEFAULT: setDefaultControlBarConfig(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp index 663491e05cb..8874bcf72d6 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp @@ -3005,8 +3005,6 @@ void ControlBar::switchControlBarStage( ControlBarStages stage ) { if(stage < CONTROL_BAR_STAGE_DEFAULT || stage >= MAX_CONTROL_BAR_STAGES) return; - if (TheRecorder && TheRecorder->getMode() == RECORDERMODETYPE_PLAYBACK) - return; switch (stage) { case CONTROL_BAR_STAGE_DEFAULT: setDefaultControlBarConfig(); From 3798a44d1bec64bbffd3c270abf5eb382ea5d637 Mon Sep 17 00:00:00 2001 From: Bart Roossien Date: Thu, 5 Jun 2025 07:46:07 +0200 Subject: [PATCH 2/2] [GEN][ZH] Allow to hide UI (F9) in observer mode --- .../GameClient/MessageStream/CommandXlat.cpp | 19 ++++++++----------- .../GameClient/MessageStream/CommandXlat.cpp | 19 ++++++++----------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index a6faef03557..690116b3358 100644 --- a/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -2991,20 +2991,17 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage } else { - if (!(TheRecorder && TheRecorder->getMode() == RECORDERMODETYPE_PLAYBACK)) + Bool hide = false; + if (TheWindowManager) { - Bool hide = false; - if (TheWindowManager) - { - Int id = (Int)TheNameKeyGenerator->nameToKey(AsciiString("ControlBar.wnd:ControlBarParent")); - GameWindow *window = TheWindowManager->winGetWindowFromId(NULL, id); - - if (window) - hide = !window->winIsHidden(); - } + Int id = (Int)TheNameKeyGenerator->nameToKey(AsciiString("ControlBar.wnd:ControlBarParent")); + GameWindow *window = TheWindowManager->winGetWindowFromId(NULL, id); - ToggleControlBar(); + if (window) + hide = !window->winIsHidden(); } + + ToggleControlBar(); } disp = DESTROY_MESSAGE; break; diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp index 149c1e31108..f235675b3ec 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp @@ -3178,20 +3178,17 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage } else { - if (!(TheRecorder && TheRecorder->getMode() == RECORDERMODETYPE_PLAYBACK)) + Bool hide = false; + if (TheWindowManager) { - Bool hide = false; - if (TheWindowManager) - { - Int id = (Int)TheNameKeyGenerator->nameToKey(AsciiString("ControlBar.wnd:ControlBarParent")); - GameWindow *window = TheWindowManager->winGetWindowFromId(NULL, id); - - if (window) - hide = !window->winIsHidden(); - } + Int id = (Int)TheNameKeyGenerator->nameToKey(AsciiString("ControlBar.wnd:ControlBarParent")); + GameWindow *window = TheWindowManager->winGetWindowFromId(NULL, id); - ToggleControlBar(); + if (window) + hide = !window->winIsHidden(); } + + ToggleControlBar(); } disp = DESTROY_MESSAGE; break;