megaglest-source
megaglest-source copied to clipboard
Add clickable unit portraits
- clicking on a unit portrait selects that unit
- shift clicking on it, deselects it
- control clicking on it selects all of the units of the same type from the selection
fixes #222
@Rampoina New method select type is not working, i tested with code from https://github.com/MegaGlest/megaglest-source/blob/68fb4cdff636c075da32df983935f81cc5d10419/source/glest_game/gui/gui.cpp#L1225
it's works fine!
so better, will be create method select type in Gui.cpp and put there encapsulated code from line above
@pavanvo please tell me what are you testing and the steps to reproduce the issue. With the last commit, control clicking does work and selects all the units of the same type in my tests. The code you linked is very similar to the one I added in selection.cpp (which I used as reference), keep in mind that it's selecting the same unit type from the selection
@Rampoina what do you think about using right-click instead of shift-click when removing selected units?
@Rampoina what do you think about using right-click instead of shift-click when removing selected units?
so, may also "select type" with double click?
@Rampoina what do you think about using right-click instead of shift-click when removing selected units?
Definitely not instead of, those are the standard bindings in most games. I see no harm in adding it as an alternative though. Double click feels intuitive but I'm not so sure about right click