mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.cosmetics
This commit is contained in:
parent
ccbd03f376
commit
dce53b4989
2 changed files with 5 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ struct AnimateCtrlGeometry : TopWindow {
|
|||
|
||||
CenterScreen().SetRect(0,0, 400, 200);
|
||||
|
||||
for(int row = 0, i = 0; row < 2; row++) {
|
||||
for(int row = 0; row < 2; row++) {
|
||||
for(int col = 0; col < 4; col++) {
|
||||
ColorPusher& bt = pushers.Add();
|
||||
bt <<= Color(Random(256), Random(256), Random(256));
|
||||
|
|
@ -25,7 +25,6 @@ struct AnimateCtrlGeometry : TopWindow {
|
|||
}
|
||||
|
||||
SetTimeCallback(1000, [&]{ Animate(ctrls, targets, 300); });
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -72,13 +72,13 @@ void Animate(Event<double> update, int duration)
|
|||
Ctrl::GuiSleep(0);
|
||||
}
|
||||
update(1);
|
||||
}
|
||||
}
|
||||
|
||||
void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration)
|
||||
{
|
||||
Vector<Rect> data;
|
||||
for(const Ptr<Ctrl>& c : ctrls)
|
||||
data.Add(Nvl(c->GetRect(), {0, 0, 0, 0}));
|
||||
Vector<Rect> data;
|
||||
for(const Ptr<Ctrl>& c : ctrls)
|
||||
data.Add(Nvl(c->GetRect(), {0, 0, 0, 0}));
|
||||
|
||||
Animate(data, targets, [&] {
|
||||
for(int i = 0; i < ctrls.GetCount(); i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue