Skip to content

Commit 8d84523

Browse files
author
Thayer J Andrews
committed
CCEffectsTest - Add labels to the sprites in the padding test
1 parent 2677e6e commit 8d84523

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

cocos2d-ui-tests/tests/CCEffectsTest.m

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,22 @@ -(id)init
2222

2323
-(void)setupPaddingEffectTest
2424
{
25-
self.subTitle = @"Glass Effect Test";
25+
self.subTitle = @"Effect Padding Test";
2626

2727
CCSprite *original = [CCSprite spriteWithImageNamed:@"Images/WhiteDiamond.png"];
2828
original.positionType = CCPositionTypeNormalized;
2929
original.position = ccp(0.25, 0.5);
3030

3131
[self.contentNode addChild:original];
3232

33+
CCLabelTTF *title1 = [CCLabelTTF labelWithString:@"Original Sprite" fontName:@"HelveticaNeue-Light" fontSize:14 * [CCDirector sharedDirector].UIScaleFactor];
34+
title1.color = [CCColor whiteColor];
35+
title1.positionType = CCPositionTypeNormalized;
36+
title1.position = ccp(0.25f, 0.1f);
37+
title1.horizontalAlignment = CCTextAlignmentCenter;
38+
39+
[self.contentNode addChild:title1];
40+
3341

3442
CCSprite *blurred = [CCSprite spriteWithImageNamed:@"Images/WhiteDiamond.png"];
3543
blurred.positionType = CCPositionTypeNormalized;
@@ -40,6 +48,14 @@ -(void)setupPaddingEffectTest
4048

4149
[self.contentNode addChild:blurred];
4250

51+
CCLabelTTF *title2 = [CCLabelTTF labelWithString:@"Blur (no padding)" fontName:@"HelveticaNeue-Light" fontSize:14 * [CCDirector sharedDirector].UIScaleFactor];
52+
title2.color = [CCColor whiteColor];
53+
title2.positionType = CCPositionTypeNormalized;
54+
title2.position = ccp(0.5f, 0.1f);
55+
title2.horizontalAlignment = CCTextAlignmentCenter;
56+
57+
[self.contentNode addChild:title2];
58+
4359

4460
CCSprite *padded = [CCSprite spriteWithImageNamed:@"Images/WhiteDiamond.png"];
4561
padded.positionType = CCPositionTypeNormalized;
@@ -50,6 +66,14 @@ -(void)setupPaddingEffectTest
5066
padded.effect = blur2;
5167

5268
[self.contentNode addChild:padded];
69+
70+
CCLabelTTF *title3 = [CCLabelTTF labelWithString:@"Padded Blur" fontName:@"HelveticaNeue-Light" fontSize:14 * [CCDirector sharedDirector].UIScaleFactor];
71+
title3.color = [CCColor whiteColor];
72+
title3.positionType = CCPositionTypeNormalized;
73+
title3.position = ccp(0.75f, 0.1f);
74+
title3.horizontalAlignment = CCTextAlignmentCenter;
75+
76+
[self.contentNode addChild:title3];
5377
}
5478

5579
-(void)setupColorChannelOffsetTest

0 commit comments

Comments
 (0)