Author Topic: [Solved] How to properly select/deselect UIInput from code?  (Read 1424 times)

Zylann

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
[Solved] How to properly select/deselect UIInput from code?
« on: August 11, 2016, 10:40:12 AM »
I need to select a UIInput field with a key, and unselect it with another key, or another arbitrary event, while also being able to select it with the mouse.

At the moment, I call input.OnSelect(mustBeSelected).
It seems to partially work, but I can see that UICamera.selected doesn't points to the right object, and sometimes it still set to the input field after I deselected.

This leads to bugs in my GUI because the field "thinks" it is focused while it isn't, and it cannot be selected...

SOLVED: I should have used isSelected, simply  ::)
« Last Edit: August 11, 2016, 10:47:39 AM by Zylann »