Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Core/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ set(GAMEENGINE_SRC
Include/GameClient/ClientRandomValue.h
Include/GameClient/Color.h
# Include/GameClient/CommandXlat.h
# Include/GameClient/ControlBar.h
# Include/GameClient/ControlBarResizer.h
# Include/GameClient/ControlBarScheme.h
Include/GameClient/ControlBar.h
Include/GameClient/ControlBarResizer.h
Include/GameClient/ControlBarScheme.h
Include/GameClient/Credits.h
Include/GameClient/DebugDisplay.h
# Include/GameClient/Diplomacy.h
Expand Down Expand Up @@ -711,18 +711,18 @@ set(GAMEENGINE_SRC
Source/GameClient/GraphDraw.cpp
# Source/GameClient/GUI/AnimateWindowManager.cpp
Source/GameClient/GUI/ChallengeGenerals.cpp
# Source/GameClient/GUI/ControlBar/ControlBar.cpp
# Source/GameClient/GUI/ControlBar/ControlBarBeacon.cpp
# Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
# Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp
# Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp
# Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
# Source/GameClient/GUI/ControlBar/ControlBarOCLTimer.cpp
# Source/GameClient/GUI/ControlBar/ControlBarPrintPositions.cpp
# Source/GameClient/GUI/ControlBar/ControlBarResizer.cpp
# Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
# Source/GameClient/GUI/ControlBar/ControlBarStructureInventory.cpp
# Source/GameClient/GUI/ControlBar/ControlBarUnderConstruction.cpp
Source/GameClient/GUI/ControlBar/ControlBar.cpp
Source/GameClient/GUI/ControlBar/ControlBarBeacon.cpp
Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp
Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp
Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
Source/GameClient/GUI/ControlBar/ControlBarOCLTimer.cpp
Source/GameClient/GUI/ControlBar/ControlBarPrintPositions.cpp
Source/GameClient/GUI/ControlBar/ControlBarResizer.cpp
Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
Source/GameClient/GUI/ControlBar/ControlBarStructureInventory.cpp
Source/GameClient/GUI/ControlBar/ControlBarUnderConstruction.cpp
# Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp
# Source/GameClient/GUI/EstablishConnectionsMenu/EstablishConnectionsMenu.cpp
Source/GameClient/GUI/Gadget/GadgetCheckBox.cpp
Expand All @@ -743,8 +743,8 @@ set(GAMEENGINE_SRC
# Source/GameClient/GUI/GameWindowManagerScript.cpp
Source/GameClient/GUI/GameWindowTransitions.cpp
# Source/GameClient/GUI/GameWindowTransitionsStyles.cpp
# Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
# Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
# Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp
# Source/GameClient/GUI/GUICallbacks/ExtendedMessageBox.cpp
# Source/GameClient/GUI/GUICallbacks/GeneralsExpPoints.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3561,10 +3561,16 @@ void ControlBar::updateSpecialPowerShortcut()
|| !ThePlayerList || !ThePlayerList->getLocalPlayer())
return;

#if RTS_GENERALS
// Base Generals just needs a Command Center to show the shortcut bar
Bool hasValidShortcutButton = (ThePlayerList->getLocalPlayer()->findNaturalCommandCenter() != nullptr);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this. I have prepared a fix with #2680

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rebase

#else
// Zero Hour looks for explicitly flagged shortcut powers or shortcut selection buttons
Bool hasShortcutSelectionButtons = hasAnyShortcutSelection();
Bool hasAnyShortcutSpecialPower = ThePlayerList->getLocalPlayer()->hasAnyShortcutSpecialPower();

Bool hasValidShortcutButton = hasShortcutSelectionButtons || hasAnyShortcutSpecialPower;
#endif

if( hasValidShortcutButton
&& m_specialPowerShortcutParent->winIsHidden()
Expand Down Expand Up @@ -3776,8 +3782,13 @@ void ControlBar::showSpecialPowerShortcut()
break;
}
}
#if RTS_GENERALS
if(dontAnimate || !ThePlayerList->getLocalPlayer()->findNaturalCommandCenter())
return;
#else
if( dontAnimate || (!ThePlayerList->getLocalPlayer()->hasAnyShortcutSpecialPower() && !hasAnyShortcutSelection()) )
return;
#endif
m_specialPowerShortcutParent->winHide(FALSE);
populateSpecialPowerShortcut(ThePlayerList->getLocalPlayer());

Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngineDevice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ set(GAMEENGINEDEVICE_SRC
Source/W3DDevice/GameClient/GUI/Gadget/W3DTabControl.cpp
Source/W3DDevice/GameClient/GUI/Gadget/W3DTextEntry.cpp
Source/W3DDevice/GameClient/GUI/Gadget/W3DVerticalSlider.cpp
# Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp
Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp
# Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp
# Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMOTD.cpp
# Source/W3DDevice/GameClient/GUI/W3DGameFont.cpp
Expand Down
34 changes: 17 additions & 17 deletions Generals/Code/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ set(GAMEENGINE_SRC
# Include/GameClient/ClientRandomValue.h
# Include/GameClient/Color.h
Include/GameClient/CommandXlat.h
Include/GameClient/ControlBar.h
Include/GameClient/ControlBarResizer.h
Include/GameClient/ControlBarScheme.h
# Include/GameClient/ControlBar.h
# Include/GameClient/ControlBarResizer.h
# Include/GameClient/ControlBarScheme.h
# Include/GameClient/Credits.h
# Include/GameClient/DebugDisplay.h
Include/GameClient/Diplomacy.h
Expand Down Expand Up @@ -655,18 +655,18 @@ set(GAMEENGINE_SRC
# Source/GameClient/GraphDraw.cpp
Source/GameClient/GUI/AnimateWindowManager.cpp
# Source/GameClient/GUI/ChallengeGenerals.cpp
Source/GameClient/GUI/ControlBar/ControlBar.cpp
Source/GameClient/GUI/ControlBar/ControlBarBeacon.cpp
Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp
Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp
Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
Source/GameClient/GUI/ControlBar/ControlBarOCLTimer.cpp
Source/GameClient/GUI/ControlBar/ControlBarPrintPositions.cpp
Source/GameClient/GUI/ControlBar/ControlBarResizer.cpp
Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
Source/GameClient/GUI/ControlBar/ControlBarStructureInventory.cpp
Source/GameClient/GUI/ControlBar/ControlBarUnderConstruction.cpp
# Source/GameClient/GUI/ControlBar/ControlBar.cpp
# Source/GameClient/GUI/ControlBar/ControlBarBeacon.cpp
# Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
# Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp
# Source/GameClient/GUI/ControlBar/ControlBarMultiSelect.cpp
# Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
# Source/GameClient/GUI/ControlBar/ControlBarOCLTimer.cpp
# Source/GameClient/GUI/ControlBar/ControlBarPrintPositions.cpp
# Source/GameClient/GUI/ControlBar/ControlBarResizer.cpp
# Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
# Source/GameClient/GUI/ControlBar/ControlBarStructureInventory.cpp
# Source/GameClient/GUI/ControlBar/ControlBarUnderConstruction.cpp
Source/GameClient/GUI/DisconnectMenu/DisconnectMenu.cpp
Source/GameClient/GUI/EstablishConnectionsMenu/EstablishConnectionsMenu.cpp
# Source/GameClient/GUI/Gadget/GadgetCheckBox.cpp
Expand All @@ -687,8 +687,8 @@ set(GAMEENGINE_SRC
Source/GameClient/GUI/GameWindowManagerScript.cpp
# Source/GameClient/GUI/GameWindowTransitions.cpp
Source/GameClient/GUI/GameWindowTransitionsStyles.cpp
Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
# Source/GameClient/GUI/GUICallbacks/ControlBarCallback.cpp
# Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp
Source/GameClient/GUI/GUICallbacks/ExtendedMessageBox.cpp
Source/GameClient/GUI/GUICallbacks/GeneralsExpPoints.cpp
Expand Down
Loading
Loading