Author Topic: Enter key works on disabled buttons..  (Read 4676 times)

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
Enter key works on disabled buttons..
« on: July 09, 2014, 09:45:04 AM »
I just got a bug report about being able to hit Enter to trigger buttons which was a huge surprise since I didn't code in the Enter button.  I went looking and found your submit and cancel key code... this could be useful but it all a sudden is making me rethink all the code I have in the entire game because I limit things by UI disables, not code (my fault I know).

The main problem I have with this is it allows hitting Enter for a button that is marked isEnabled=false.  Is there any way to prevent this from working on disabled objects?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Enter key works on disabled buttons..
« Reply #1 on: July 09, 2014, 03:31:51 PM »
Remove the selection from this disabled button, and you won't be able to re-select it anymore. No selection = no key events.