Skip to content

Commit

Permalink
Fixed issue cocos2d#1226
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoquesada committed Aug 25, 2011
1 parent a494bdc commit e6fb656
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -7,6 +7,7 @@ version 1.1 - XX-Ago-2011
. [FIX] FileUtils: Loads -hd resources even if the sd resource is not present (issue #1179)
. [FIX] FileUtils: renamed ccRemoveSuffixFromFile to +[CCFileUtils removeSuffixFromFile:];
. [FIX] FileUtils: localized resources can be loaded using fullPathFromRelativePath (issue #1230)
. [FIX] LayerColor: init calls initWithColor:width:height (issue #1226)

version 1.0.1 - 28-July-2011
. [FIX] All: Implicit atomic properties converted to nonatomic
Expand Down
4 changes: 3 additions & 1 deletion cocos2d/CCLayer.h
Expand Up @@ -166,7 +166,9 @@
/** creates a CCLayer with color. Width and height are the window size. */
+ (id) layerWithColor: (ccColor4B)color;

/** initializes a CCLayer with color, width and height in Points */
/** initializes a CCLayer with color, width and height in Points.
This is the designated initializer.
*/
- (id) initWithColor:(ccColor4B)color width:(GLfloat)w height:(GLfloat)h;
/** initializes a CCLayer with color. Width and height are the window size. */
- (id) initWithColor:(ccColor4B)color;
Expand Down
6 changes: 6 additions & 0 deletions cocos2d/CCLayer.m
Expand Up @@ -287,6 +287,12 @@ + (id) layerWithColor:(ccColor4B)color
return [[(CCLayerColor*)[self alloc] initWithColor:color] autorelease];
}

-(id) init
{
return [self initWithColor:ccc4(0,0,0,0) width:0 height:0];
}

// Designated initializer
- (id) initWithColor:(ccColor4B)color width:(GLfloat)w height:(GLfloat) h
{
if( (self=[super init]) ) {
Expand Down

0 comments on commit e6fb656

Please sign in to comment.