Skip to content

Conversation

@ShizCalev
Copy link

@ShizCalev ShizCalev commented Mar 3, 2025

This change backports the left mouse click deselect functionality with the Alternate Mouse Setup from Zero Hour to Generals. Previously in Generals it was not possible to deselect units or buildings with a mouse click when the Alternate Mouse Setup was enabled.

@DevGeniusCode DevGeniusCode added GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals Enhancement Is new feature or request labels Mar 3, 2025
@ShizCalev ShizCalev changed the title Backports Zero Hour's alt-mouse mode's left click deselect functionality Feature: Backports Zero Hour's alt-mouse mode's left click deselect functionality Mar 4, 2025
@xezon xezon changed the title Feature: Backports Zero Hour's alt-mouse mode's left click deselect functionality [GEN] Add Zero Hour's alt-mouse mode's left click deselect functionality to Generals Mar 30, 2025
Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

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

Backported correctly from ZH, but the Superhacker comments need to disappear to make it GEN and ZH version identical for future merging.

Compiled and tested it and the option does indeed appear in the options menu.

@Skyaero42 Skyaero42 added the Unify Unifies code between Generals and Zero Hour label May 10, 2025
@ShizCalev ShizCalev requested a review from Skyaero42 May 10, 2025 19:18
@xezon
Copy link

xezon commented May 11, 2025

Can someone please explain what this changes? I do not understand the title and I also do not understand "PreventLeftClickDeselectionInAlternateMouseModeForOneClick".

@Skyaero42
Copy link

Can someone please explain what this changes? I do not understand the title and I also do not understand "PreventLeftClickDeselectionInAlternateMouseModeForOneClick".

"Alternate mouse mode" is a setting in the options menu in the game moves the action commands (move, attack etc) from the left to the right mouse button. The left mouse button would then be used to deselect any selected unit(s).

However in Generals this is bugged and pressing the left button doesn't deselect. In ZH the developers fixed this.
What the code checks for - I think - if it is really a deselect command. And not e.g. a left click to place a building, because you don't want to deselect the dozer at that point.

This is a direct code-copy from ZH, so also helps with unifying code.

@xezon xezon changed the title [GEN] Add Zero Hour's alt-mouse mode's left click deselect functionality to Generals [GEN] Backport left click deselect functionality with Alternate Mouse Setup from Zero Hour May 11, 2025
@xezon
Copy link

xezon commented May 11, 2025

Ok now I understand. I updated the title and description to clarify what this does.

The change looks safe, but perhaps it would still be worthwhile to test if this would cause multiplayer mismatch. I don't think it will but I am not 100% sure.

@Skyaero42
Copy link

That's fine. Will need to fix the ExeCRC issue first. I've linked it in the start post as a reminder

@Skyaero42
Copy link

Tested, no mismatch

@xezon xezon merged commit 6218501 into TheSuperHackers:main May 13, 2025
21 checks passed
@ShizCalev ShizCalev deleted the control-backport branch May 14, 2025 12:26
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
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 Unify Unifies code between Generals and Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inconsistent "Alternative mouse setup" between CCG and ZH

4 participants