mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Reduce marquee speed
This commit is contained in:
@@ -44,6 +44,10 @@ void DoMarquee (void)
|
|||||||
if ((!theMarquee.active) || (theMarquee.paused))
|
if ((!theMarquee.active) || (theMarquee.paused))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
theMarquee.step++;
|
||||||
|
|
||||||
|
if (theMarquee.step >= theMarquee.interval)
|
||||||
|
{
|
||||||
DrawSurface *surface = mainWindow->GetDrawSurface();
|
DrawSurface *surface = mainWindow->GetDrawSurface();
|
||||||
const uint8_t *pattern = theMarquee.pats[theMarquee.index];
|
const uint8_t *pattern = theMarquee.pats[theMarquee.index];
|
||||||
DrawMarquee(surface, pattern);
|
DrawMarquee(surface, pattern);
|
||||||
@@ -53,6 +57,9 @@ void DoMarquee (void)
|
|||||||
|
|
||||||
pattern = theMarquee.pats[theMarquee.index];
|
pattern = theMarquee.pats[theMarquee.index];
|
||||||
DrawMarquee(surface, pattern);
|
DrawMarquee(surface, pattern);
|
||||||
|
|
||||||
|
theMarquee.step = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- StartMarquee
|
//-------------------------------------------------------------- StartMarquee
|
||||||
@@ -515,6 +522,8 @@ void InitMarquee (void)
|
|||||||
theMarquee.active = false;
|
theMarquee.active = false;
|
||||||
theMarquee.paused = false;
|
theMarquee.paused = false;
|
||||||
theMarquee.handled = false;
|
theMarquee.handled = false;
|
||||||
|
theMarquee.step = 0;
|
||||||
|
theMarquee.interval = 2;
|
||||||
gliderMarqueeUp = false;
|
gliderMarqueeUp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
Pattern pats[kNumMarqueePats];
|
Pattern pats[kNumMarqueePats];
|
||||||
Rect bounds, handle;
|
Rect bounds, handle;
|
||||||
short index, direction, dist;
|
short index, direction, dist, step, interval;
|
||||||
Boolean active, paused, handled;
|
Boolean active, paused, handled;
|
||||||
} marquee;
|
} marquee;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user