MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
344 stars 89 forks source link

Add clickable unit portraits #231

Open Rampoina opened 1 year ago

Rampoina commented 1 year ago

fixes #222

pavanvo commented 1 year ago

@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

Rampoina commented 1 year ago

@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

andy5995 commented 1 year ago

@Rampoina what do you think about using right-click instead of shift-click when removing selected units?

pavanvo commented 1 year ago

@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 commented 1 year ago

@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