Skip to content

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Jan 7, 2026

This change allows players to bring up the quit menu and exit the game during the match outcome screen via the ESC key. Players are no longer forced to wait for the duration of the match outcome before they can exit the game.

QUIT_MENU.mp4

@Stubbjax Stubbjax self-assigned this Jan 7, 2026
@Stubbjax Stubbjax added Enhancement Is new feature or request GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Jan 7, 2026
@Caball009
Copy link

I think it was always possible to move the cursor (even if it doesn't show) to the button above the idle worker button and use that to bring up the quit menu. Much better to have ESC working at all times, though.

@Stubbjax
Copy link
Author

Stubbjax commented Jan 7, 2026

I think it was always possible to move the cursor (even if it doesn't show) to the button above the idle worker button and use that to bring up the quit menu. Much better to have ESC working at all times, though.

I swear that has worked for me before too, but I haven't been able to reproduce it.

{

TheMouse->setCursor( Mouse::ARROW );
TheMouse->setVisibility(true);
Copy link

Choose a reason for hiding this comment

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

Instead of doing that, perhaps we should not hide mouse in victory screen?

Because now when toggling Quit Menu, then Mouse will be visible anyway, right?

Copy link
Author

Choose a reason for hiding this comment

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

The cursor is hidden as part of the ScriptActions::doDisableInput method. It's preferable not to touch this as it may be used in other pathways (such as via script commands or during cinematic playback).

While we could simply re-enable the mouse after doDisableInput is called, it does not feel as clean. It makes sense to enforce cursor visibility when showing the quit menu to remove the responsibility from other call sites.

Additionally, as the control bar is also disabled on match outcome, it makes sense to leave the cursor hidden to further communicate to the user that they cannot access it. Pressing ESC will of course reveal the cursor, but by then the user will no longer have any reason to access the control bar.

We can create a follow-up task if we want to try and figure a way to have only the options button on the control bar available during the match outcome and leave the cursor visible. I expect such a task will be a lot more involved.

Choose a reason for hiding this comment

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

If I cancel the QuitMenu (using Esc key), the mouse stays visible. Shouldn't it be hidden again?

Copy link

Choose a reason for hiding this comment

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

Either that or never hidden at all I would say.

If mouse visibility is difficult to control with just a single boolean flag, then perhaps it requires flags similar to how we do it for the cursor capture (see CursorCaptureBlockReason).

The core principle of using the flags approach is that multiple systems can ask for hiding a cursor but do not conflict with each other.

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 GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants