如何在 GameConfig.h 中存储 CCLabelTTF 颜色,例如:
#define kGameLabelColor ccc3(79,71,59);
如何在 GameConfig.h 中存储 CCLabelTTF 颜色,例如:
#define kGameLabelColor ccc3(79,71,59);
Define it in GameConfig.h, without the ;
in the end:
#define kGameLabelColor ccc3(79,71,59)
To use it:
#import "GameConfig.h"
...
[label setColor:kGameLabelColor];
If you want to change the color of all your labels in the whole app by default, I think you may consider modifying initWithString
method in CCLabelTTF.m, adding color_ = ccc3(79,71,59);
.