playMaker

Author Topic: Send "OnClick" event to UI button?  (Read 3847 times)

Ubik3D

  • Playmaker Newbie
  • *
  • Posts: 22
    • www.hypnorama.se
Send "OnClick" event to UI button?
« on: July 03, 2017, 04:19:45 PM »
I am trying to send an event to a button, which would simulate a press on the button.

I cannot do this using "set property", so I guess I need to send some kind of event to the button. But how do I do this?

I am using the new UI.

Best,
Daniel

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Send "OnClick" event to UI button?
« Reply #1 on: July 03, 2017, 09:08:05 PM »
Hi,
You need to get 'Ugui Proxy Full' on the Ecosystem
It has a whole bunch of actions for Ugui.

Here is a introduction video.



Ubik3D

  • Playmaker Newbie
  • *
  • Posts: 22
    • www.hypnorama.se
Re: Send "OnClick" event to UI button?
« Reply #2 on: July 04, 2017, 05:47:23 AM »
Thank You, however, this does not solve my problem.

I want to SEND a "button click event" from within an fsm, which simulates a click on a button, without actually clicking on it.

I think that I want to call a method on the button, but I don't know what method to call.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send "OnClick" event to UI button?
« Reply #3 on: July 04, 2017, 05:53:15 AM »
Hi,

 simply implement your own Global events and on your state have two global transitions, one coming from the usual user input channel, and one that you programmatically call within your logic.

 this way you avoid messing with system events or proxies events, and it will be a lot easier to maintain and debug over time.

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Send "OnClick" event to UI button?
« Reply #4 on: July 04, 2017, 11:21:11 AM »
Hi,
Sorry i misunderstood the question.
if you don't know yet how to use global events and global transitions.
Here is a video explaining this, so you can do what jean explained. :)