Multiple Mouse selection

Hi,

I´m programming my first game in Java6 with JWGL 2.0.1. It will be a strategy game like Warcraft or AoE.

I putted some entities (trees, grass und units) on my gui and have already realized a single-target-selection.
So I select an unit and click on a free position where the unit has to walk to.

My problem is, I´ve no idea, how to realize a multiple-target-selection.
Has anyone an idea or can anyone post a code-example.

Thanks for your help.
Tiaclagear

Just record the Mouse location once the button on mouse has been pressed down (Mouse.isDown(0)) then record it again once the mouse has been released, this will give you a rectangle from the two points. Now scroll through your list of units checking which ones are in the rectangle and selecting them.

You can also draw the rectangle to screen too as the two points are updated to give visual display of it.

Thanks

it works