The Code - etlgfx/nmw GitHub Wiki
Selection Manager / Mouse Controls
There are a lot of ways we can handle mouse control, to accomplish tradition RTS controls we could do something like:
selection manager receives click
if (rightclick)
cancel selection
else if (has selection)
do something with hits objects or coords (e.g. move / attack command)
else
add to selection
This can obviously be extended to detect dragging a selection rectangle at first, and once a group is selected, issue a command to all. If a group is selected, show a context menu in bottom / right / left of screen. e.g. C&C, Starcraft, TA.
We can also try various other control schemes. Gestures are an interesting options.
- hold right mouse for in place context menu, drag and release to select option.
- drag left mouse from building to building (coord to coord) to indicate orders.