playMaker

Author Topic: Need help learning about GUI Button/Mouse Enter!  (Read 1423 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Need help learning about GUI Button/Mouse Enter!
« on: April 03, 2014, 10:13:50 PM »
Lately I've been reading about global events. My goal is to have my GUI buttons change when the user hovers over them. I've read the manual pages that cover the topic, as well as this thread: http://hutonggames.com/playmakerforum/index.php?topic=4674.0

But I'm still having a hard time understanding how to implement it. Right now my menu exists in one game object. It hides by default, and then when the player presses escape, it goes to a state which draws all the buttons - depending on which button is pressed, it passes to a new state with different buttons, etc.

From what I'm understanding, if I want to use global events like "mouse enter", I will need a separate gameobject for each menu button, correct? Or is there some other way to control mouse enter based on each gui button? What I'm aiming for is

Create GUI button > on mouse enter, change to slightly different texture > on mouse exit, revert to original texture

I'm not sure how global events like "mouse enter" are able to listen to a specific GUI element, other than that element being in its own game object. Even then, it sounds like the mouse entering one button would globally trigger all the buttons to activate if I were to use this method.

Can anyone give me a nugde, push, kick, etc in the right direction? :D