its really loving strange, it seems half broken because it doesn't seem to call yourGuiControl::onMouseWhatever(), it just only calls GuiMouseEventCtrl::onMouseWhatever(). i fixed it by packaging the actual GuiMouseEventCtrl::onMouseUp and added this:
function GuiMouseEventCtrl::onMouseUp(%this, %control, %eventModifier, %xy, %numMouseClicks)
{
Parent::onMouseUp(%this, %control, %eventModifier, %xy, %numMouseClicks);
if(%this == yourMouseControl.getId())
{
whatever
}
}
that seemed to work, but idk if it's the best way to do it