GUI.RepeatButton ... Input.MouseButtonUp

Hi,
I have a GUI.RepeatButton on my screen and I would like it to have 2 function.
If the user mouseClicks it and releases it immediately - it should load level 1.
If the user holds the mouse down for 3 seconds and releases it - it should load level 0.

The button will be used to do this:

  1. when clicked normally - it will quit the game and load the MainMenu (level1)
  2. when clicked and held down - it will quit the game and load the LoginScreen (level0)

I’ve been searching for a solution for some time now, but all I can found are some workarounds.
Doesn’t this class have it’s Input.MouseButtonUp equivalent?
A kind of a “GUI.RepeatButtonUp” option?

You can always fake it.

private bool buttonDown = false;
private bool buttonDownLastFrame = false;

void OnGUI (){
    if(GUI.RepeatButton){
        buttonDown = true;
    } else {
        buttonDown = false;
    }
}

void Update (){
    if(!buttonDown && buttonDownLastFrame){
        // Do button up functions here
    }
    if(buttonDown && !buttonDownLastFrame){
        // Do button down functions here
    }
    buttonDownLastFrame = buttonDown;
}

There is probably a better way to doe this.