Don´t use buttons for that

Use a Bitmap with fix colors for each state.
Now readout the pixel below the mouse spot with the pixel functions and ask for the pixel BGR.
When left clicking, start a function that calls the state option for the given color ^^

example:
Code:
var fhandler = bmap_lock(bitmap1,8888);
var keyhit = 0;

[...loop here...]
if(mouse_left == 1 && keyhit == 0)
{
	pixel = pixel_for_bmap(bitmap1, pix_x, pix_y);
	pixel_to_vec(temp,NULL,8888,pixel);
	
	if(temp.red <= 10 && temp.green <= 50 && temp.blue <= 63)  //Color of Montana hit
	{call_state("Montana");}
	else if(temp.red <= 255 && temp.green <= 0 && temp.blue <= 0)  //Color of Washington hit
	{call_state("Washington");}
	else if(temp.red <= 0 && temp.green <= 255 && temp.blue <= 0)  //Color of Iowa hit
	{call_state("Iowa");}
	[...etc...]
	
	keyhit = 1; //to lock mousekey
}
else if(mouse_left == 0 && keyhit == 1) //to unlock mousekey
{
	keyhit = 0;
}


[...after loop break...]
bmap_unlock(bitmap1);



pix_x and pix_y need to be calculated from the mouse_pos on the bitmap.

Additional Tipp:
You can use a color-bitmap to check the color, and a satellite bitmap as overlay to show a map.

Last edited by Espér; 03/23/12 19:26.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<