With a dynamic swirl of colors often in the background, labels can sometimes be hard to identify onscreen. To remedy this, we can create labels with dark shadows behind them. In this recipe, we will create a few of these labels.
#import "ShadowLabel.h" @implementation Ch5_ShadowedLabels -(CCLayer*) runRecipe { [super runRecipe]; /* Draw four different shadowed labels using 4 different fonts */ [CCMenuItemFont setFontSize:47]; [CCMenuItemFont setFontName:@"Georgia"]; [self label:@"Label 1" at:ccp(-120,50) color:ccc3(0,50,255) activeColor:ccc3(0,200,255) selector:@selector(labelTouched:) tag:1]; [CCMenuItemFont setFontSize:40]; [CCMenuItemFont setFontName:@"Marker Felt"]; [self label:@"Label 2" at:ccp(120,50) color:ccc3(255,128,0) activeColor:ccc3(255,255,0) selector:@selector(labelTouched:) tag:2]; ...