Skip to content

Plain left-click squad selection conflicts with SmartSelect #1

@MadeByGabe

Description

@MadeByGabe

Problem

Ideally, a plain left-click on empty ground would select the closest squad.

Currently this doesn't work because the SmartSelect widget also receives the left-click.
This by itself wouldn't be an issue but SmartSelect also clears the selection on mouse release except when shift or ctrl is held.
This is why the current implementation requires either ctrl or shift to work with mouse.
(smart select still 'runs' but doesn't do anything since shift would add to the selection and ctrl would remove specific units from it)

We can't return true from MousePress to consume the click because that would also block box-selection, which needs to work normally.

The most straightforward solution in my opinion would be to change the smart select widget to not do anything except when the mouse has moved let's say 10 pixels. This way a click would select the closest squad while a mouse drag would start a box select and if that box doesn't contain any units, it would do a deselection like it does now.

I'm sure there are other solutions as well.

And of course it's not clear to me how important it is to have the plain left-click selection method working at all. Maybe it could be double click, or exclusively hotkeys, or maybe the current ctrl+click is just good enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions