@@ -38,7 +38,7 @@ - (id) init
38
38
39
39
// Create test content
40
40
self.contentNode = [CCNode node ];
41
- self.contentNode .contentSizeType = CCSizeTypeMake (CCSizeUnitNormalized, CCSizeUnitInsetPoints );
41
+ self.contentNode .contentSizeType = CCSizeTypeMake (CCSizeUnitNormalized, CCSizeUnitInsetUIPoints );
42
42
self.contentNode .contentSize = CGSizeMake (1 , 44 );
43
43
self.contentNode .name = @" TestBase Content Node" ;
44
44
@@ -48,25 +48,25 @@ - (id) init
48
48
49
49
// Header background
50
50
CCSprite9Slice* headerBg = [CCSprite9Slice spriteWithImageNamed: @" Interface/header.png" ];
51
- headerBg.positionType = CCPositionTypeMake (CCPositionUnitPoints, CCPositionUnitPoints , CCPositionReferenceCornerTopLeft);
51
+ headerBg.positionType = CCPositionTypeMake (CCPositionUnitUIPoints, CCPositionUnitUIPoints , CCPositionReferenceCornerTopLeft);
52
52
headerBg.position = ccp (0 ,0 );
53
53
headerBg.anchorPoint = ccp (0 ,1 );
54
- headerBg.contentSizeType = CCSizeTypeMake (CCSizeUnitNormalized, CCSizeUnitPoints );
54
+ headerBg.contentSizeType = CCSizeTypeMake (CCSizeUnitNormalized, CCSizeUnitUIPoints );
55
55
headerBg.contentSize = CGSizeMake (1 , 44 );
56
56
57
57
[self addChild: headerBg];
58
58
59
59
// Header label
60
- _lblTitle = [CCLabelTTF labelWithString: NSStringFromClass ([self class ]) fontName: @" HelveticaNeue-Medium" fontSize: 17 ];
60
+ _lblTitle = [CCLabelTTF labelWithString: NSStringFromClass ([self class ]) fontName: @" HelveticaNeue-Medium" fontSize: 17 * [CCDirector sharedDirector ].UIScaleFactor ];
61
61
_lblTitle.positionType = CCPositionTypeNormalized;
62
62
_lblTitle.position = ccp (0 .5f ,0 .5f );
63
63
64
64
[headerBg addChild: _lblTitle];
65
65
66
- _lblSubTitle = [CCLabelTTF labelWithString: @" " fontName: @" HelveticaNeue-Light" fontSize: 14 ];
66
+ _lblSubTitle = [CCLabelTTF labelWithString: @" " fontName: @" HelveticaNeue-Light" fontSize: 14 * [CCDirector sharedDirector ].UIScaleFactor ];
67
67
_lblSubTitle.shadowColor = [CCColor blackColor ];
68
68
_lblSubTitle.shadowBlurRadius = 2.5 ;
69
- _lblSubTitle.positionType = CCPositionTypeMake (CCPositionUnitNormalized, CCPositionUnitPoints , CCPositionReferenceCornerTopLeft);
69
+ _lblSubTitle.positionType = CCPositionTypeMake (CCPositionUnitNormalized, CCPositionUnitUIPoints , CCPositionReferenceCornerTopLeft);
70
70
_lblSubTitle.position = ccp (0.5 , 64 );
71
71
_lblSubTitle.horizontalAlignment = CCTextAlignmentCenter;
72
72
@@ -76,7 +76,7 @@ - (id) init
76
76
CCSpriteFrame* frame = [[CCSpriteFrameCache sharedSpriteFrameCache ]spriteFrameByName:@" Interface/btn-back.png" ];
77
77
78
78
_btnBack = [CCButton buttonWithTitle: NULL spriteFrame: frame];
79
- _btnBack.positionType = CCPositionTypeMake (CCPositionUnitPoints, CCPositionUnitPoints , CCPositionReferenceCornerTopLeft);
79
+ _btnBack.positionType = CCPositionTypeMake (CCPositionUnitUIPoints, CCPositionUnitUIPoints , CCPositionReferenceCornerTopLeft);
80
80
_btnBack.position = ccp (22 , 22 );
81
81
_btnBack.background .opacity = 0 ;
82
82
@@ -85,7 +85,7 @@ - (id) init
85
85
86
86
// Prev button
87
87
_btnPrev = [CCButton buttonWithTitle: NULL spriteFrame: [[CCSpriteFrameCache sharedSpriteFrameCache ]spriteFrameByName:@" Interface/btn-prev.png" ]];
88
- _btnPrev.positionType = CCPositionTypeMake (CCPositionUnitPoints, CCPositionUnitPoints , CCPositionReferenceCornerBottomLeft);
88
+ _btnPrev.positionType = CCPositionTypeMake (CCPositionUnitUIPoints, CCPositionUnitUIPoints , CCPositionReferenceCornerBottomLeft);
89
89
_btnPrev.position = ccp (22 , 22 );
90
90
_btnPrev.background .opacity = 0 ;
91
91
@@ -94,7 +94,7 @@ - (id) init
94
94
95
95
// Next button
96
96
_btnNext = [CCButton buttonWithTitle: NULL spriteFrame: [[CCSpriteFrameCache sharedSpriteFrameCache ]spriteFrameByName:@" Interface/btn-next.png" ]];
97
- _btnNext.positionType = CCPositionTypeMake (CCPositionUnitPoints, CCPositionUnitPoints , CCPositionReferenceCornerBottomRight);
97
+ _btnNext.positionType = CCPositionTypeMake (CCPositionUnitUIPoints, CCPositionUnitUIPoints , CCPositionReferenceCornerBottomRight);
98
98
_btnNext.position = ccp (22 , 22 );
99
99
_btnNext.background .opacity = 0 ;
100
100
@@ -103,7 +103,7 @@ - (id) init
103
103
104
104
// Reload button
105
105
_btnReload = [CCButton buttonWithTitle: NULL spriteFrame: [[CCSpriteFrameCache sharedSpriteFrameCache ]spriteFrameByName:@" Interface/btn-reload.png" ]];
106
- _btnReload.positionType = CCPositionTypeMake (CCPositionUnitNormalized, CCPositionUnitPoints , CCPositionReferenceCornerBottomLeft);
106
+ _btnReload.positionType = CCPositionTypeMake (CCPositionUnitNormalized, CCPositionUnitUIPoints , CCPositionReferenceCornerBottomLeft);
107
107
_btnReload.position = ccp (0.5 , 22 );
108
108
_btnReload.background .opacity = 0 ;
109
109
0 commit comments