Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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:
int q = 25 * t / 200

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: no true Iterator support in Upp???
Next Topic: How to init StreamString
Goto Forum:
  


Current Time: Fri Jul 04 01:41:14 CEST 2025

Total time taken to generate the page: 0.05124 seconds