playMaker

Author Topic: uGui Button Right Click[SOLVED]  (Read 3720 times)

ssk9208

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
uGui Button Right Click[SOLVED]
« on: June 15, 2015, 06:49:46 PM »
I need to detect right clicking on a uGui button. Is there an easy way to change the uGui button action to do that, or can someone help me by making an action?

Thanks!
« Last Edit: October 25, 2016, 01:22:35 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: uGui Button Right Click
« Reply #1 on: June 15, 2015, 10:50:02 PM »
Hi,

 that's a good question. I found the source code that likely will allow for this, I'll implement it in the next release.

http://forum.unity3d.com/threads/can-the-ui-buttons-detect-a-right-mouse-click.279027/


https://trello.com/c/9vKL4GHj/135-unity-ui-update


Bye,

 Jean

ssk9208

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: uGui Button Right Click
« Reply #2 on: June 23, 2015, 07:03:11 PM »
Thanks! Please notify when its done.

ssk9208

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: uGui Button Right Click
« Reply #3 on: August 09, 2015, 09:03:28 PM »
Any updates on this?

precisionclear

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: uGui Button Right Click
« Reply #4 on: August 05, 2016, 06:09:19 PM »
Sorry for the necro, but was wondering the same thing.
I've built an inventory and realized the uGUI Button's only detect left clicks.

Will try creating a seperate FSM that always gets.LMouseButtonDown or R.MouseButtonDown and see if it can send the data right after button is pressed. But this is a very round about way of doing it.

Actually, this is was a surprisingly simply solution.
« Last Edit: August 05, 2016, 06:13:46 PM by precisionclear »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: uGui Button Right Click
« Reply #5 on: August 10, 2016, 01:05:00 AM »
Hi,

 Thanks for this. Indeed there is a pending update for UGUI, so it's on my todo :)

 Bye,

 Jean

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 189
    • View Profile
    • Haven Made
Re: uGui Button Right Click
« Reply #6 on: September 12, 2016, 05:40:23 PM »
Hi,

 Thanks for this. Indeed there is a pending update for UGUI, so it's on my todo :)

 Bye,

 Jean

Wahoo! Excellent! :D thank you Jean!

SO useful haha :D

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 189
    • View Profile
    • Haven Made
Re: uGui Button Right Click
« Reply #7 on: September 28, 2016, 05:10:26 AM »
Hi,

 Thanks for this. Indeed there is a pending update for UGUI, so it's on my todo :)

 Bye,

 Jean

Sorry for the bump again :) and loose eta on this? :D

EDIT: Or any quick instruction on how to pull the last pointer ID info into the FSM?

best,

craigz
« Last Edit: September 28, 2016, 08:32:07 PM by craigz »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14237
  • Official Playmaker Support
    • View Profile
Re: uGui Button Right Click
« Reply #8 on: October 25, 2016, 01:22:22 AM »
Hi,

 Yes, the new version on the Ecosystem allows to get this information.

so now GetLastPointerEventData will give you InputButton values

and I did a new action GetLastPointerEventDataInputButton that takes less space in the action stack to just get the button info and use events for more effective Fsm states logics.

 


Bye,

 Jean