We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Button animations
Page Index Toggle Pages: 1
Button animations (Read 489 times)
Button animations
Apr 17th, 2009, 11:29am
 
How do you add animations  to a button so that when it pressed, it looks like it's pushed down. instead of remaining flat? Help pls!!!!
Re: Button animations
Reply #1 - Apr 17th, 2009, 12:10pm
 
Probably have to do something with mouse pressed or the event of the button.
http://processing.org/reference/mousePressed_.html
Re: Button animations
Reply #2 - Apr 17th, 2009, 12:44pm
 
you have to creat different images and add them for mouseOver and mouse Pressed...
i  guess this is what you are looking for :
http://processing.org/learning/topics/imagebutton.html

Re: Button animations
Reply #3 - Apr 17th, 2009, 12:52pm
 
Once you decide that you need buttons you will find other GUI components useful e.g. text fields, radio buttons, sliders/scrollbars.

If that is the case I suggest that you look at one of the 2D GUI libraries available  e.g. GUI4Processing, ControlP5.

I must admit to being biased here as I created the GUI4Processing library.

You can get the library and see examples of it in action at gui4processing@lagers.org.uk

Currently it is version 1.1  but I am just finishing V1.2 which has some significant enhancements in particular support for image buttons, and timer events.


Page Index Toggle Pages: 1