22 #import "CommodityFunctions.h" |
22 #import "CommodityFunctions.h" |
23 #import <sys/types.h> |
23 #import <sys/types.h> |
24 #import <sys/sysctl.h> |
24 #import <sys/sysctl.h> |
25 #import <mach/mach.h> |
25 #import <mach/mach.h> |
26 #import <mach/mach_host.h> |
26 #import <mach/mach_host.h> |
|
27 #import <QuartzCore/QuartzCore.h> |
27 #import "AudioToolbox/AudioToolbox.h" |
28 #import "AudioToolbox/AudioToolbox.h" |
28 #import "PascalImports.h" |
29 #import "PascalImports.h" |
29 |
30 |
30 void createTeamNamed (NSString *nameWithoutExt) { |
31 void createTeamNamed (NSString *nameWithoutExt) { |
31 NSString *teamsDirectory = TEAMS_DIRECTORY(); |
32 NSString *teamsDirectory = TEAMS_DIRECTORY(); |
258 |
259 |
259 //Use audio services to play the sound |
260 //Use audio services to play the sound |
260 AudioServicesPlaySystemSound(soundID); |
261 AudioServicesPlaySystemSound(soundID); |
261 } |
262 } |
262 |
263 |
263 NSArray inline *getAvailableColors(void) { |
264 NSArray inline *getAvailableColors (void) { |
264 return [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:0x4376e9], // bluette |
265 return [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:0x4376e9], // bluette |
265 [NSNumber numberWithUnsignedInt:0x3e9321], // greeeen |
266 [NSNumber numberWithUnsignedInt:0x3e9321], // greeeen |
266 [NSNumber numberWithUnsignedInt:0xa23dbb], // violett |
267 [NSNumber numberWithUnsignedInt:0xa23dbb], // violett |
267 [NSNumber numberWithUnsignedInt:0xff9329], // oranngy |
268 [NSNumber numberWithUnsignedInt:0xff9329], // oranngy |
268 [NSNumber numberWithUnsignedInt:0xdd0000], // reddish |
269 [NSNumber numberWithUnsignedInt:0xdd0000], // reddish |
269 [NSNumber numberWithUnsignedInt:0x737373], // graaaay |
270 [NSNumber numberWithUnsignedInt:0x737373], // graaaay |
270 [NSNumber numberWithUnsignedInt:0xbba23d], // gold$$$ |
271 [NSNumber numberWithUnsignedInt:0xbba23d], // gold$$$ |
271 [NSNumber numberWithUnsignedInt:0x3da2bb], // cyannnn |
272 [NSNumber numberWithUnsignedInt:0x3da2bb], // cyannnn |
272 nil]; |
273 nil]; |
273 } |
274 } |
|
275 |
|
276 UILabel *createBlueLabel (NSString *title, CGRect frame) { |
|
277 return createLabelWithParams(title, frame, 1.5f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_DARKBLUE); |
|
278 } |
|
279 |
|
280 UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor) { |
|
281 UILabel *theLabel = [[UILabel alloc] initWithFrame:frame]; |
|
282 theLabel.backgroundColor = backgroundColor; |
|
283 |
|
284 if (title != nil) { |
|
285 theLabel.text = title; |
|
286 theLabel.textColor = UICOLOR_HW_YELLOW_TEXT; |
|
287 theLabel.textAlignment = UITextAlignmentCenter; |
|
288 theLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]*80/100]; |
|
289 } |
|
290 |
|
291 [theLabel.layer setBorderWidth:borderWidth]; |
|
292 [theLabel.layer setBorderColor:borderColor.CGColor]; |
|
293 [theLabel.layer setCornerRadius:8.0f]; |
|
294 [theLabel.layer setMasksToBounds:YES]; |
|
295 |
|
296 return theLabel; |
|
297 } |