Home » U++ Library support » U++ Core » Animate does not really animate
Re: Animate does not really animate [message #28655 is a reply to message #28565] |
Thu, 09 September 2010 12:43   |
 |
mirek
Messages: 14265 Registered: November 2005
|
Ultimate Member |
|
|
frankdeprins wrote on Tue, 07 September 2010 07:25 | Hello,
Lately, I was wondering why the GUIEFFECT_SLIDE produces such a flickering and messy effect, rather than a nice and smooth sliding.
The first thing I discovered, in the Animate function (CtrlLib.cpp), is that there is a grow/shrink factor calculated:
Now, since t is always <= 200, this q is always 0 except just before the loop is aborted.
|
Not true. You have missied 25 * ....
Quote: |
I got a much smoother result by replacing the growing factor by the following code:
|
Only smoother because you have skipped
q *= q;
line... The idea there is that slide effect should accelerate, so longer lists get animated about as fast as shorter ones.
Anyway, maybe your approach, where we are always fixed time long is better...
Mirek
[Updated on: Thu, 09 September 2010 12:46] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jul 04 01:41:14 CEST 2025
Total time taken to generate the page: 0.05124 seconds
|