Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Sundaerae on March 04, 2015, 06:34:47 AM

Title: Using 'Cancel' key
Post by: Sundaerae on March 04, 2015, 06:34:47 AM
How do I use it?
As far as I know, Submit is tied to 'On Click' in Event Trigger and 'Select on Click' on UIKeyNavigation. But there is no trigger for 'Cancel'.
Example: If I'm on save menu then I want to quit, I press the 'Cancel' button, then a confirmation pop up appears "Do you want to continue without saving?" and 2 button Yes/No. How do I achieve this?

*If this was 'Submit' button, I can just use the 'confirmation pop up' panel as target for 'Select on Click' on UIKeyNavigation, add Event Trigger on that panel to show itself, then be done with it.
Title: Re: Using 'Cancel' key
Post by: ArenMook on March 05, 2015, 09:54:52 PM
You can directly bind buttons to keys by using UIKeyBinding. This will give you both a visual button, as well as a button bound to a controller button.