Skip to content

[GEN] Backport left click deselect functionality with Alternate Mouse Setup from Zero Hour #332

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

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 Generals Related Generals only 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

@roossienb roossienb 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.

@roossienb roossienb added the Unify Unifies code between Generals and Zero Hour label May 10, 2025
@ShizCalev ShizCalev requested a review from roossienb 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".

@roossienb
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.

@roossienb
Copy link

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

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 Generals Related Generals only 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