1
NGUI 3 Support / Re: UIKey Binding - keyboard+mouse selection problem
« on: December 10, 2014, 10:17:04 AM »
Actually I was talking about both the hover event and the selection, I just wasn't sure how they were separate things. It makes a lot more sense now. However, I'm still unable to get these two to play nicely with each other.
For example, it is confusing that the menu behaves differently depending on if it's called with UIKeyBinding or a mouse click (one creates a selection, the other does not). I can see the logic behind it though.
Am I correct to assume that the selection piggybacks on the hover event for displaying what its current selection is? If that is the case I think that's where most of my confusion comes from. In part because it looks like there's "sometimes" two hovers/selections at the same time, but also because the mouse can hide the selection by hovering it and leaving (making the button enter the "Normal" state, despite still being selected).
My ideas for solving my previously mentioned problems would be to:
- Create a selection both when clicking and using UIKeyBinding to call the menu.
- Have the selection snap to the button the mouse is currently hovering.
- Not have the UIButton enter its Normal state if the button is selected but the mouse leaves.
Quick edit: also make the selection not accept mouse input to move itself (it jumps to new buttons when the mouse have moved X distance anywhere on the screen).
Is this possible with the provided scripts or should I just bite the bullet and get familiar with the code side of things?
Again, thanks for your time.
For example, it is confusing that the menu behaves differently depending on if it's called with UIKeyBinding or a mouse click (one creates a selection, the other does not). I can see the logic behind it though.
Am I correct to assume that the selection piggybacks on the hover event for displaying what its current selection is? If that is the case I think that's where most of my confusion comes from. In part because it looks like there's "sometimes" two hovers/selections at the same time, but also because the mouse can hide the selection by hovering it and leaving (making the button enter the "Normal" state, despite still being selected).
My ideas for solving my previously mentioned problems would be to:
- Create a selection both when clicking and using UIKeyBinding to call the menu.
- Have the selection snap to the button the mouse is currently hovering.
- Not have the UIButton enter its Normal state if the button is selected but the mouse leaves.
Quick edit: also make the selection not accept mouse input to move itself (it jumps to new buttons when the mouse have moved X distance anywhere on the screen).
Is this possible with the provided scripts or should I just bite the bullet and get familiar with the code side of things?
Again, thanks for your time.
