fa icon indicating copy to clipboard operation
fa copied to clipboard

Extend functionality of selection sets (control groups)

Open Garanas opened this issue 3 years ago • 4 comments

Implements the majority of suggestions by Blodir from this post on the forums. All the functionality is optional, it will default to what everyone is used to. Specifically, it allows to:

  • Introduce a flag to allow you to steal units from other selection sets
  • Introduce a flag to not add units to the selection set of the factory that produced it
  • Customize the double tap behavior to allow:
---@alias SelectionSetDoubleTapBehavior
--- | 'none'                        # When you double tap it will have no effect
--- | 'translate-zoom'              # When you double tap the camera translates and zooms to the units, default behavior
--- | 'translate-zoom-if-lower'     # When you double tap the camera translates and zooms to the units, but it won't zoom in
--- | 'translate'                   # When you double tap the camera only translates
  • Customize the append behavior to allow:
---@alias SelectionSetAppendBehavior
--- | 'add-selection-set-to-selection'          # Adds the selection set to the current selection
--- | 'add-selection-to-selection-set'          # Adds the current selection to the selection set
--- | 'combine-and-select-with-selection-set'   # Adds the current selection to the selection set and selects the new selection set

Garanas avatar Aug 12 '22 09:08 Garanas

image

Garanas avatar Aug 12 '22 10:08 Garanas

Blodir evaluated the branch, it appears to be good. Could someone else review it too? Just a matter of trying the options, see if what is supposed to happen, happens

Garanas avatar Aug 13 '22 07:08 Garanas

This is beyond awesome, I tried to tackle the issue of factories adding units to their control groups but couldn't find the code responsible for it and gave up. I am really glad you managed to make this work!

Tagada14 avatar Aug 13 '22 11:08 Tagada14

I've added hotkeys to choose the exact append behavior, regardless of the option set. But they won't show up. Does anyone know why? Previous hotkeys always showed up just fine

Garanas avatar Aug 14 '22 08:08 Garanas

I recommend creating localization entries for the options--I actually got tired of syncing my changes to the localization text to the string file when I did localization for the profiler, so I created a utility to automatically pull (and number!) LOC's from files (inasmuch as we can have access to them). I suspect we could automate it even further than that too. Note that I'm not asking you to translate everything, just to leave as an option for someone to.

Hdt80bro avatar Aug 22 '22 22:08 Hdt80bro

I've added hotkeys to choose the exact append behavior, regardless of the option set. But they won't show up. Does anyone know why? Previous hotkeys always showed up just fine

~~It appears that only items in the UserKeyMap or UserDebugKeyMap table keys in the user preferences are used for GetKeyLookup~~ Uh, this is actually exactly what we want Everything looks to be fine, so I'm guessing this got figured out

Hdt80bro avatar Aug 22 '22 22:08 Hdt80bro

I've added hotkeys to choose the exact append behavior, regardless of the option set. But they won't show up. Does anyone know why? Previous hotkeys always showed up just fine

~It appears that only items in the UserKeyMap or UserDebugKeyMap table keys in the user preferences are used for GetKeyLookup~ Uh, this is actually exactly what we want Everything looks to be fine, so I'm guessing this got figured out

ah, yes - my apologies 😄

Garanas avatar Aug 23 '22 05:08 Garanas