Skip to content

Conversation

Stubbjax
Copy link

@Stubbjax Stubbjax commented Sep 3, 2025

This change allows observers to select the next idle worker of the currently viewed player.

OBSERVE_IDLE.mp4

@Stubbjax Stubbjax self-assigned this Sep 3, 2025
@Stubbjax Stubbjax added Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Sep 3, 2025
showIdleWorkerLayout();

if((idleCount <= 0 && m_idleWorkerWin) || !getInputEnabled())
if((idleCount <= 0 && m_idleWorkerWin) || TheGameLogic->isGamePaused())
Copy link

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?

Copy link
Author

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.

Copy link

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?

Copy link
Author

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.

Copy link

@xezon xezon Sep 5, 2025

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?

Copy link

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.

Copy link

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.

Copy link
Author

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.

Copy link

@xezon xezon Sep 8, 2025

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.

Copy link

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.

xezon
xezon previously approved these changes Sep 8, 2025
@@ -89,6 +89,7 @@ static NameKeyType buttonCancelID = NAMEKEY_INVALID;

static GameWindow *winFlag = NULL;
static GameWindow *winGeneralPortrait = NULL;
static GameWindow *buttonIdleWorker = NULL;
Copy link

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.

Copy link

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.

Copy link

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.

Copy link
Author

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.

@xezon
Copy link

xezon commented Sep 12, 2025

I have isolated the idle worker button active condition into #1566

@xezon xezon dismissed their stale review September 12, 2025 06:30

Generals code different to Zero Hour code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Is new feature or request Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants