Game Development Community

Animated GUI Button

by Andrew H · in Torque Game Builder · 08/10/2011 (5:55 pm) · 5 replies

I have decided to use the GUI editor to make...uh...GUI. Anyway, I need buttons (GASP!) and I want those buttons to animate when you mouse over them. How would I do this?

#1
08/11/2011 (11:47 am)
@Laura As you might guess, people have asked this question many times over years, and most got their answer. You should be able to find necessary information if you throw something like "site:garagegames.com animated gui button" into google. Not trying to be rude. Searching skills is extremely valuable in programming area, make you look like you know everything. Also much faster than waiting for someone to read your post and reply.
#2
08/11/2011 (2:38 pm)
@Rpahut, Oh, okay. Sorry - I didn't mean to make a nuisance of myself.
#3
08/11/2011 (7:56 pm)
If you have extensive problems building a GUI, you could potentially take this route as well: overlay a transparent "GUIWindow2D" over your "SceneWindow2D" (by editing your mainscreen.gui file), then use scene objects on that scenewindow as GUI controls. They can take all the mouse callbacks (including "onMouseEnter" and "onMouseLeave", which would help with what you want), and you're probably already familiar with manipulating them.

There are downsides to that as well (such as having to manually pass mouse events to sceneWindow2D), though so far I am enjoying it. I really enjoy being able to use the level builder to create my GUI screens and customize them via script.
#4
08/12/2011 (12:59 pm)
docs.garagegames.com/torque-3d/official/content/documentation/GUI%20Editor/Tutor...

I believe all the engines share the same GUI system so that should work with the naming scheme.
#5
08/13/2011 (3:01 pm)
@Derek, Thanks a bunch! This should help a LOT.