playMaker

Author Topic: Ugui Detect Pressed button  (Read 1883 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Ugui Detect Pressed button
« on: November 03, 2016, 09:01:27 AM »
Hi,
Is there a way with Ugui to detect which button is pressed?

So i have multiple buttons in Ugui sending to the same event and i want to detect which button was pressed.
After that, i want to check it in an array and then i will use the index nr for some other things.

I don't want to multiple events because there are 100+ buttons and the fsm wil get very messy.

Kemono

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Ugui Detect Pressed button
« Reply #1 on: November 03, 2016, 09:23:02 AM »
Can you do it with Send Event Properties and Get Event Properties?
In case the button's FSM sends event to gamecontroller's FSM.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Ugui Detect Pressed button
« Reply #2 on: November 03, 2016, 10:44:56 AM »
Hi,
I think you got me into the right direction, not with 'Send Event Properties' or 'Get Event Properties'.
But with 'Get Event Info'
i can get the gameobject under 'Send By Gameobject'
Then find the object in an array and i get the index nr that i need..

will test this and let you know if this works

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Ugui Detect Pressed button
« Reply #3 on: November 08, 2016, 03:14:23 PM »
Hi,
the playmaker Ugui proxy component does send an event but it is not detected by 'Get Event Info' so i had to make an fsm on each button when it was clicked to send an event and then it works.