@@ -65,15 +65,13 @@ std::filesystem::path PackInfoPopup::getPathInPack(const char* filename) const {
65
65
bool PackInfoPopup::setup (std::shared_ptr<Pack> pack) {
66
66
m_pack = pack;
67
67
68
- auto winSize = CCDirector::sharedDirector ()->getWinSize ();
69
-
70
68
auto title = WackyBypassFont::create (
71
69
pack->getDisplayName ().c_str (),
72
70
this ->getPathInPack (" goldFont.fnt" )
73
71
);
74
72
title->setPosition (
75
- winSize .width / 2 ,
76
- winSize .height / 2 + m_size.height / 2 - 30 .f
73
+ m_size .width / 2 ,
74
+ m_size .height / 2 + m_size.height / 2 - 30 .f
77
75
);
78
76
m_mainLayer->addChild (title);
79
77
@@ -84,7 +82,7 @@ bool PackInfoPopup::setup(std::shared_ptr<Pack> pack) {
84
82
this ->getPathInPack (" bigFont.fnt" )
85
83
);
86
84
bigFontLabel->limitLabelWidth (m_size.width , .5f , .1f );
87
- bigFontLabel->setPosition (winSize / 2 + CCPoint { 0 .f , 10 .f });
85
+ bigFontLabel->setPosition (m_size / 2 + CCPoint { 0 .f , 10 .f });
88
86
m_mainLayer->addChild (bigFontLabel);
89
87
90
88
// GJ_button_01.png
@@ -111,7 +109,7 @@ bool PackInfoPopup::setup(std::shared_ptr<Pack> pack) {
111
109
auto defaultBtn = CCMenuItemSpriteExtra::create (
112
110
defaultBtnSpr, this , nullptr
113
111
);
114
- defaultBtn->setPosition (-60 .f , -50 .f );
112
+ defaultBtn->setPosition (m_size / 2 + CCPoint{ -60 .f , -50 .f } );
115
113
m_buttonMenu->addChild (defaultBtn);
116
114
117
115
// GJ_button_02.png
@@ -138,7 +136,7 @@ bool PackInfoPopup::setup(std::shared_ptr<Pack> pack) {
138
136
auto altBtn = CCMenuItemSpriteExtra::create (
139
137
altBtnSpr, this , nullptr
140
138
);
141
- altBtn->setPosition (60 .f , -50 .f );
139
+ altBtn->setPosition (m_size / 2 + CCPoint{ 60 .f , -50 .f } );
142
140
m_buttonMenu->addChild (altBtn);
143
141
144
142
return true ;
0 commit comments