Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: yahodahan on April 07, 2014, 03:03:16 PM

Title: Eyedropper loses selection, panning loses selection, selecting multiple trouble
Post by: yahodahan on April 07, 2014, 03:03:16 PM
Jumping back into some GUI work and running across several issues, figured might as well drop them all in one, if that is alright. Attached GIFs for a few of them, to make it better explained.

>Clicking eyedropper on area to get color, also performs actual click, losing selection
(https://dl.dropboxusercontent.com/u/16902251/ngui%20bugs/eyedropper.gif)

>Using middle-click to pan, if a GUI item is selected, when the middle-click is released it counts as a left click and selection is lost
(https://dl.dropboxusercontent.com/u/16902251/ngui%20bugs/pan.gif)

>Holding "CTRL" or "SHIFT" to select multiple items often does not work, unless zoomed in fairly close, the click only selects the object and does not add to selection
(https://dl.dropboxusercontent.com/u/16902251/ngui%20bugs/select%20multiple.gif)

>With multiple objects selected (simple sprites, in my case), "Right-Click > Attach" menu is relative only to last-selected object
(https://dl.dropboxusercontent.com/u/16902251/ngui%20bugs/context%20menu.gif)

>With multiple objects selected, keyboard shortcuts only affect last selected object (ie, Alt-Shift-C to add box collider)

>With multiple objects selected, clicking on the Unity frame loses selection
Title: Re: Eyedropper loses selection, panning loses selection, selecting multiple trouble
Post by: ArenMook on April 07, 2014, 10:47:56 PM
Quote
>Clicking eyedropper on area to get color, also performs actual click, losing selection
Click the "lock" icon in your inspector window and the selection will not be lost.
Quote
>Using middle-click to pan, if a GUI item is selected, when the middle-click is released it counts as a left click and selection is lost
I can't reproduce this one. Middle mouse button never causes a left click.
Quote
>Holding "CTRL" or "SHIFT" to select multiple items often does not work, unless zoomed in fairly close, the click only selects the object and does not add to selection
This is Unity. You need to double-click UIRoot to reset your scene camera's near/far clip planes, thus fixing the selection.
Quote
>With multiple objects selected (simple sprites, in my case), "Right-Click > Attach" menu is relative only to last-selected object
This one I can fix.
Title: Re: Eyedropper loses selection, panning loses selection, selecting multiple trouble
Post by: yahodahan on April 07, 2014, 11:20:09 PM
Thanks for the quick reply. None of these are killer items obviously, just posting 'em up as items I think would improve the workflow.

1) Locking the inspector is an option, yep, but gets tedious to do all the time.

2) Hmm, maybe "counts as left click" was incorrect, that was an assumption. It does perform a "select" action, or something similar though. An important factor is this only happens when multiple NGUI objects are selected. Were you able to test with that in mind?

3) Odd- if the click is intercepted by the proper object (which it is), it seems to me the "CTRL" or "SHIFT" modifier is somehow being lost. The issue isn't that the wrong item is being selected, or failing to select, it is that the clicked object becomes the only selected object, instead of being added to the selection.

4) Cool, thanks.

Hopefully those clear things up a bit?
Title: Re: Eyedropper loses selection, panning loses selection, selecting multiple trouble
Post by: ArenMook on April 07, 2014, 11:58:11 PM
Re #2: I see what you mean. You're right. You can fix it by adding an early exit to UIWidgetInspector, line 701:
  1.                         case EventType.MouseUp:
  2.                         {
  3.                                 if (e.button != 0) break; // <-- this right here
  4.                                 if (GUIUtility.hotControl == id)
  5.                                 {
  6.                                         GUIUtility.hotControl = 0;
  7.                                         GUIUtility.keyboardControl = 0;
Title: Re: Eyedropper loses selection, panning loses selection, selecting multiple trouble
Post by: yahodahan on April 08, 2014, 12:28:27 AM
Great, that'll save me lots of frustration :)