mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlLib: Fixed corner case of Animage(SLIDE)
git-svn-id: svn://ultimatepp.org/upp/trunk@7748 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3d34bf797d
commit
bcf1050335
1 changed files with 5 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ NAMESPACE_UPP
|
|||
|
||||
#define LLOG(x) // RLOG(x)
|
||||
|
||||
// #define SLOWANIMATION
|
||||
#define SLOWANIMATION
|
||||
|
||||
#define IMAGECLASS CtrlImg
|
||||
#define IMAGEFILE <CtrlLib/Ctrl.iml>
|
||||
|
|
@ -36,10 +36,12 @@ void Animate(Ctrl& c, const Rect& target, int type)
|
|||
if(r.bottom < target.bottom)
|
||||
r.bottom += ((target.bottom - r.bottom) * t) / anitime;
|
||||
if(r.GetWidth() > target.GetWidth())
|
||||
r.right = (r.left + ((r.GetWidth() - target.GetWidth()) * t) / anitime);
|
||||
r.right = r.left + target.GetWidth();
|
||||
if(r.GetHeight() > target.GetHeight())
|
||||
r.bottom = (r.top + ((r.GetHeight() - target.GetHeight()) * t) / anitime);
|
||||
r.bottom = r.top + target.GetHeight();
|
||||
c.SetRect(r);
|
||||
if(r == target)
|
||||
break;
|
||||
}
|
||||
else
|
||||
if(type == GUIEFFECT_FADE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue