check if gui button is pressed?

Hey guys,

is it possible to check if a gui button is pressed in a Update()?

Some background:
Making a basic jump game on android. If you tap anywhere on screen you jump. except if you hit the menu button the menu should pop up and you should not jump. is there a way to check if button was pressed?

right now i am detecting the jump simply by

Update() {
if(Input.GetMouseButtonDown(0)) {
Jump();
}

is there anything i can put in that if statement before the Jump() to check if a specific gui button was pressed?

Thanks guys

By default no, however there is an extended button control in the UIExtensions project that does implement a held event. (link in sig)

i guess i could maybe set a bool on click that disables my jump? if i click the menu i’l set a bool NoJump = true. and nojump = false when i leave the menu

i dont know if that will work though… since it may have jumped by the time the bool is set.

nevermind. it doesnt work. the get mouse button down occurs before the button press event to set the bool.