playMaker

Author Topic: On Focus - U Gui Button [SOLVED]  (Read 1480 times)

DennisJensen

  • Full Member
  • ***
  • Posts: 104
On Focus - U Gui Button [SOLVED]
« on: February 06, 2018, 07:14:50 AM »
Hi Guys,

I been working on some Gui for our game KnightOut.

What I would like to do is when a button is focused a event happens. It does work when I click on it, and with the help from the U Gui Pointer Events script I can hover over it with the mouse and trigger the event.

However what I would like is to trigger the event when it's focused, because then it also works with a joystick and with the keyboard. You could click the button, but in this case it would work best when it's just focused, and the click would be a unnecessary extra thing.

Let me know if you have any ideas to solve this? Or if you had a similar problem.

Thank you,
/Dennis
« Last Edit: February 07, 2018, 07:49:41 AM by DennisJensen »
Game Designer, CEO, Artist
http://2ndStudio.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: On Focus - U Gui Button
« Reply #1 on: February 07, 2018, 04:27:32 AM »
Hi,

you can use the component "EventTrigger" which will allow you send an event, which you can catch in various ways ( directly calling a PLayMakerFsm, or using the EventProxy wizard ( from the PlayMaker utils package)



 Bye,

 Jean

DennisJensen

  • Full Member
  • ***
  • Posts: 104
Re: On Focus - U Gui Button
« Reply #2 on: February 07, 2018, 07:49:23 AM »
Awesome that did the trick, thank you.
Game Designer, CEO, Artist
http://2ndStudio.com