Welcome,
Guest
. Please
login
or
register
.
June 12, 2026, 07:39:26 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
BUG : UICenterOnChild not recentering with mouse scroll wheel
« previous
next »
Print
Pages: [
1
]
Author
Topic: BUG : UICenterOnChild not recentering with mouse scroll wheel (Read 4696 times)
Quarkism
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 48
BUG : UICenterOnChild not recentering with mouse scroll wheel
«
on:
May 24, 2013, 12:03:16 PM »
I think I found a bug! I've been able to replicate it in example 7 (clipping drag panel).
TL;DR
When use a mouse to scroll in a drag panel the recenter method is not being called.
Steps to replicate
Open Example 7
Pres Play
Check the 'center on item checkbox'
Drag; The drag panel should center correctly
Now use the mouse wheel scroll;
It will not center correctly
«
Last Edit: May 24, 2013, 01:24:41 PM by Quarkism
»
Logged
Quarkism
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 48
Re: BUG : UICenterOnChild not recentering with mouse scroll wheel
«
Reply #1 on:
May 24, 2013, 12:12:35 PM »
I hacked a fix. The solution was to add the following to line 676 of UIDraggablePanel.cs
//Code To Add
if
(
onDragFinished
!=
null
)
onDragFinished
(
)
// In Context
// Restrict the contents to be within the panel's bounds
if
(
restrictWithinPanel
&&
mPanel
.
clipping
!=
UIDrawCall
.
Clipping
.
None
)
RestrictWithinBounds
(
false
)
;
if
(
onDragFinished
!=
null
)
onDragFinished
(
)
;
return
;
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: BUG : UICenterOnChild not recentering with mouse scroll wheel
«
Reply #2 on:
May 24, 2013, 05:01:26 PM »
Doesn't this change make it run the callback every time it moves?
Logged
Quarkism
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 48
Re: BUG : UICenterOnChild not recentering with mouse scroll wheel
«
Reply #3 on:
May 28, 2013, 12:21:03 PM »
Yeah I was thinking that, but functional and inefficient is better then broken and efficient. I was hoping
you
would have a better fix.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
BUG : UICenterOnChild not recentering with mouse scroll wheel