warzone2100
warzone2100 copied to clipboard
Track selected group number(s) (UI)
Right now, when a group is selected we properly select all containing droids, but we don’t store / track the selected group number..
- ~~Add a new
optional<uint32_t> uiCurrentSelectedGroupNumber
~~ (see EDIT below) - When a group is explicitly selected (via either keybind or the groups UI), set
uiCurrentSelectedGroupNumber
to the selected group number - When selection changes, reset
uiCurrentSelectedGroupNumber
if:- A member of the
uiCurrentSelectedGroupNumber
group loses selection - An object that isn’t in the
uiCurrentSelectedGroupNumber
group gains selection - (i.e. If the selected objects no longer encompass the entirety of the group + no others)
- A member of the
- Add public function
optional<uint32_t> getUICurrentSelectedGroupNumber()
to retrieve the value
Optional additional UI enhancements:
- Highlight the group button in the groups UI that is associated with the
uiCurrentSelectedGroupNumber
EDIT: Additional thoughts:
- We could actually track which groups are fully selected (which could be more than one) PLUS a bool for whether any objects not in a group are selected, which opens up more possibilities. (Since it is possible to select more than one group manually right now, with the selection rect. And I could see where it would be useful to augment the groups UI to allow selecting more than one group concurrently as well.)
If marking that a group is fully selected, would it be helpful to be able to mark that a group is partially selected? Maybe a marker could also be made for representing ungrouped units selected. Marking multiple groups simultaneously would be more useful if all groups could be displayed at the same time instead of with a scrollbar.
Working with the new group features I still thought it would be useful to have it take less space and see all groups at once if only 1 vehicle is shown out of a mix of grouped vehicles (admittedly could be harder to tell what exact unit type with smaller models) and the color for damaged status brings up questions of if it is showing incoming damage instead or if it is 1 unit's health vs the whole group's health to cause the color to change.
Often if an RTS has a way to see a selected unit as a model on the HUD, they have a way to see multiple unit models there with each unit's health/damaged state visible at a glance.