-
Notifications
You must be signed in to change notification settings - Fork 94
feat: Observers can now select the next idle worker of the currently viewed player #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Observers can now select the next idle worker of the currently viewed player #1526
Conversation
Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
Outdated
Show resolved
Hide resolved
showIdleWorkerLayout(); | ||
|
||
if((idleCount <= 0 && m_idleWorkerWin) || !getInputEnabled()) | ||
if((idleCount <= 0 && m_idleWorkerWin) || TheGameLogic->isGamePaused()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an unrelated change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Input is disabled when observing which disables the idle worker button otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And why does it not allow to select an idle worker when the game is paused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, it's just how it works in 1.04 where bringing up the menu in solo games disables the button. This change just preserves that behaviour while also allowing the button to be active during replays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this then also disables the button when pausing the game in Replays or Skirmish.
Maybe put a different condition for when quit menu is opened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm odd. Maybe that is a separate topic then.
From user perspective I expect to just be able to click a button when the game is paused. So for example it is also possible to click the quit menu and diplomacy buttons in the Control Bar when the game is paused, and the game remains paused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it looks fine without the isGamePaused
condition.
The Communicator Button is also not disabled on game pause.
We will then also be able to cycle through the Workers while the game is paused with P button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a little out of this change's scope but it's small enough. Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you like it to be a separate change you can add it as a second commit or as follow up Pull Request.
Or rather, make it a change before this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generals code is different to Zero Hour code.
Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarObserver.cpp
Show resolved
Hide resolved
@@ -89,6 +89,7 @@ static NameKeyType buttonCancelID = NAMEKEY_INVALID; | |||
|
|||
static GameWindow *winFlag = NULL; | |||
static GameWindow *winGeneralPortrait = NULL; | |||
static GameWindow *buttonIdleWorker = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment here or somewhere appropriate that the idle worker button is now also presented in the Observer Bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use @tweak
or @feature
.
@info
is mainly intended for information when nothing tangible was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I push to this branch? Then I can tweak that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unavailable until the 13th so feel free.
I have isolated the idle worker button active condition into #1566 |
Generals code different to Zero Hour code
This change allows observers to select the next idle worker of the currently viewed player.
OBSERVE_IDLE.mp4