Page 1 of 1

button stay pressed

Posted: Tue Aug 27, 2013 10:18 am
by vedus
I know somewhere is a answer about this question but i am looking in the forum without result :(
is any trick that >when button is pressed in ipad app to stay pressed?so the user know what is up that moment?
for clarification if the above trick exist can be work with custom made buttons?(i use button changed texture and hilite texture).
thank you.

Re: button stay pressed

Posted: Tue Aug 27, 2013 1:48 pm
by dunbarx
Not sure what you mean by "stay pressed".

Do you want, say,the hilite of the button to change after the user clicks on it? This is simple. With a custom button, perhaps one that uses an image, you can do something similar, or change the image itself.

Write back if this is not what you had in mind.

Craig Newman

Re: button stay pressed

Posted: Tue Aug 27, 2013 3:14 pm
by magice
It sounds like you are trying to create a toggle effect on your button, where you turn something on and the button stays hilited. You can then turn it off and the button hilite returns to false. I use this a lot. uncheck auto hilite in your button properties. then put this code in the button.

Code: Select all

on mouseUp
  if the hilite of me is true 
   then 
      set the hilite of me to false
   else
      set the hilite of me to true
   end if
end mouseUp
This effect works well with square buttons, but not with push buttons as their hilite state is less obvious.

Re: button stay pressed

Posted: Tue Aug 27, 2013 5:31 pm
by vedus
thank you for the response guys.
Yes i want the button to stay hilited until the user press other buttons.
So if i figure out with custom graphics, is best to set the hilite in the custom hilited image?