Author Topic: UIPopup List not selecting item after changing the Submit button on Camera Keys  (Read 2013 times)

selosoft

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
We have a drop down list that allows the user to change the language of the game. The functionality works for the most part, except for with a Playstation 4 controller, specifically for the reasons below:

1. We want the "Submit" button to be the "X" button on the PS4 controller, but NGUI defines it as the "Square" button by default. So we change the Submit key in the UICamera's Axes and Keys to then be the "X" button. Now OnClick works as we want it to :) However, when attempting to select an item from a UIPopuplist the selection is never made. It simply closes the list and reopens it right away.

The functionality works as expected with an XBox one controller, because we never have to change the submit key because it defaults to "A" on the controller as we want it to. But for Ps4, selecting GUI items w/ Square is just odd and thus we change it to be "X" as it's more standard this way. We realize this is the problem, but shouldn't the popuplist recognize the chosen submit key?

Does anyone have a solution or workaround for this? Thanks for your help.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Not sure about this one... I always used InControl to have a consistent key binding setup regardless of the controller. This post may help: http://www.tasharen.com/forum/index.php?topic=13047.0

UIPopupList itself doesn't listen to specific keys. You can just search for "OnClick" in it to see what it does -- the event comes from the UICamera (around line 2471).

selosoft

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Thanks, this is interesting. I should be able to modify based on the information in your linked post.