Welcome,
Guest
. Please
login
or
register
.
April 19, 2026, 11:54:01 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
why compare function return the same value
« previous
next »
Print
Pages: [
1
]
Author
Topic: why compare function return the same value (Read 2836 times)
loverains
Guest
why compare function return the same value
«
on:
September 17, 2012, 01:07:17 AM »
in updatemanager.cs,
static int Compare (UpdateEntry a, UpdateEntry b)
{
if (a.index < b.index) return 1;
if (a.index > b.index) return 1;
return 0;
}
this is comparer for sorting,why return the same value on differrent situation?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: why compare function return the same value
«
Reply #1 on:
September 17, 2012, 03:29:42 AM »
Bug! Thanks for pointing it out.
Logged
loverains
Guest
Re: why compare function return the same value
«
Reply #2 on:
September 17, 2012, 03:40:50 AM »
in uibuttonkeys.cs
case KeyCode.Tab:
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
{
if (selectOnLeft != null) UICamera.selectedObject = selectOnLeft.gameObject;
else if (selectOnUp != null) UICamera.selectedObject = selectOnUp.gameObject;
else if (selectOnDown != null) UICamera.selectedObject = selectOnDown.gameObject;
else if (selectOnRight != null) UICamera.selectedObject = selectOnRight.gameObject;
}
else
{
if (selectOnRight != null) UICamera.selectedObject = selectOnRight.gameObject;
else if (selectOnDown != null) UICamera.selectedObject = selectOnDown.gameObject;
else if (selectOnUp != null) UICamera.selectedObject = selectOnUp.gameObject;
else if (selectOnRight != null) UICamera.selectedObject = selectOnRight.gameObject;
}
break;
i think this one also a bug,we should replace the last selectonright to left
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: why compare function return the same value
«
Reply #3 on:
September 17, 2012, 03:43:55 AM »
Good eye.
Logged
loverains
Guest
Re: why compare function return the same value
«
Reply #4 on:
September 17, 2012, 03:54:32 AM »
i'm learning unity programming from ur ngui and ship war package,really great works.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
why compare function return the same value