From 7eb543b37f42f708611f969de2d813a5457c54d8 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Fri, 4 Jan 2013 16:26:04 -0500 Subject: Created score bar Closes #190 --- Classes/ScoreBarLayer.m | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Classes/ScoreBarLayer.m (limited to 'Classes/ScoreBarLayer.m') diff --git a/Classes/ScoreBarLayer.m b/Classes/ScoreBarLayer.m new file mode 100644 index 0000000..b838ac9 --- /dev/null +++ b/Classes/ScoreBarLayer.m @@ -0,0 +1,41 @@ +// +// ScoreBarLayer.m +// Cartographic +// +// Created by Starla Insigna on 1/4/13. +// Copyright 2013 __MyCompanyName__. All rights reserved. +// + +#import "ScoreBarLayer.h" + + +@implementation ScoreBarLayer + ++ (ScoreBarLayer*)scoreBar +{ + return [[[ScoreBarLayer alloc] init] autorelease]; +} + +- (id)init +{ + self = [super initWithColor:ccc4(101, 214, 253, 255) fadingTo:ccc4(0, 104, 248, 255)]; + + if (nil != self) + { + [self changeWidth:480 height:40]; + self.position = ccp(0, 280); + } + + return self; +} + +- (void)draw +{ + [super draw]; + + glEnable(GL_LINE_SMOOTH); + glColor4ub(0, 0, 0, 255); + ccDrawLine(ccp(0,0), ccp(480,0)); +} + +@end -- cgit 1.4.1