image map, custom buttons, etc.

  • Thread starter Thread starter SirPoonga
  • Start date Start date
S

SirPoonga

What would you suggest I do for the following problem.
I want to make an application (vb.net or c#) that has a picture of a
dartboard and you can click on certain cells of the dartboard.

I am wondering what the best way to determine where on a dartboard the
user clicked. An image map or custom buttons for each cell.

if image map how would I map out the cells?
 
If I were doing it, I'd just make the thing a bitmap, get the cartesian
coordinates from the hit test, remap from a cartesian coordinate system
(X,Y) polar system (angles & lenghts) and figure out where the user hit
based on angle & distance. There is computational overhead in changing the
coordinate system, but it's cleaner from a logical standpoint in that you
are converting the coordinate to the dartboard's "native" system.
 
Ahhh, right. The bull would be 0,0. Then it's just a matter of trig
and geometry to figure out where on the board the user clicked. So
image map would be easier.
 
Back
Top