| x | x position relative to the upper left edge of the panel |
| y | y position relative to the upper left edge of the panel |
| bmapOn | bitmap displayed when the button is clicked on; gives also the size of the button |
| bmapOff | bitmap displayed when the mouse is not over the button |
| bmapOver | bitmap displayed when the mouse is over the button |
| functionOn | function executed if the mouse is clicked over the button |
| functionOff | function executed if the mouse is released over the button or leaves the button |
| functionOver | function executed if the mouse touches the button |
EVENT_TOUCH - the mouse was moved over the button
EVENT_RELEASE - the mouse was moved away from the button
EVENT_CLICK - left mouse button was clicked over the button
EVENT_BUTTONUP - left mouse button was released over the button
EVENT_RELEASE and EVENT_BUTTONUP can
be used to distinguish whether functionOff was
triggered by leaving the button or releasing the mouse button.
function count_up_skill(button_number,panel)
{
snd_play(click,50,0);
if (button_number == 1) { player.SKILL40 += 1; }
if (button_number == 2) { player.SKILL41 += 1; }
if (button_number == 3) { player.SKILL42 += 1; }
}
panel skill_pan
{
button = 0,0,on_map,off_map,off_map,count_up_skill,NULL,NULL;
button = 0,10,on_map,off_map,off_map,count_up_skill,NULL,NULL;
button = 0,20,on_map,off_map,off_map,count_up_skill,NULL,NULL;
}