Permalink
Browse files

Add NUMBER_OF_SLIDES constant.

- Use in appropriate places.
  • Loading branch information...
1 parent 8f3c9bf commit 5c4259f026b1d8d6b03b962fb684a59e084c3203 @kamitchell kamitchell committed Oct 23, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −0 Blitz_Prefix.pch
  2. +1 −1 CounterView.m
  3. +1 −1 MyAppDelegate.m
View
@@ -8,4 +8,5 @@
#define SECONDS_PER_SLIDE (15)
#define UPDATES_PER_SECOND (60)
+ #define NUMBER_OF_SLIDES (20)
#endif
View
@@ -152,7 +152,7 @@ - (void)drawRect:(NSRect)rect {
NSBezierPath *innerTalkElapsedWedge = [NSBezierPath bezierPath];
[innerTalkElapsedWedge moveToPoint:center];
- CGFloat degreesElapsed = ((CGFloat)self.secondsElapsed * 360.0f) / 300.0f;
+ CGFloat degreesElapsed = ((CGFloat)self.secondsElapsed * 360.0f) / (SECONDS_PER_SLIDE * NUMBER_OF_SLIDES);
[innerTalkElapsedWedge appendBezierPathWithArcWithCenter:center
radius:innerCircleBounds.size.width / 2.0f
startAngle:twelveOclock-degreesElapsed
View
@@ -94,7 +94,7 @@ - (void) advanceSlide {
}
- (void) tick:(NSTimer*) timer {
- if (self.secondsElapsed < 5 * 60)
+ if (self.secondsElapsed < NUMBER_OF_SLIDES * SECONDS_PER_SLIDE)
{
self.secondsElapsed += 1.0 / UPDATES_PER_SECOND;

0 comments on commit 5c4259f

Please sign in to comment.