function MenuButton::onMouseEnter(%this, %modifier, %worldPos, %clicks)
{
   %selectionMarker = %this.getName() @ "_selection";
   if(isObject(%selectionMarker))
      %selectionMarker.setVisible(true);
      
   alxPlay(buttonMouseoverSound);
}

function MenuButton::onMouseLeave(%this, %modifier, %worldPos, %clicks)
{
   %selectionMarker = %this.getName() @ "_selection";
   if(isObject(%selectionMarker))
      %selectionMarker.setVisible(false);
}

function MenuButton::onMouseDown(%this, %modifier, %worldPos, %clicks)
{
   alxPlay(buttonClickSound);
}

function MenuButton::onMouseUp(%this, %modifier, %worldPos, %clicks)
{
   %function = %this.buttonFunction;
   if(isFunction(%function))
      call(%function);
}