Skip to content

Commit 5e98290

Browse files
committed
smaller refactors
1 parent 304444a commit 5e98290

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/EndLevelLayer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
9898
const auto pointsLabel = getChildByIDRecursive("points-label");
9999
if (!manager->isCompactEndscreen) timeLabel->setPositionY(timeLabel->getPositionY() - 20);
100100
if (pointsLabel) pointsLabel->setPositionY(timeLabel->getPositionY() - 18);
101-
const auto attemptsLabel = cocos2d::CCLabelBMFont::create(("Attempts: " + std::to_string(playLayer->m_attempts)).c_str(), "goldFont.fnt");
101+
CCLabelBMFont* attemptsLabel = CCLabelBMFont::create(("Attempts: " + std::to_string(playLayer->m_attempts)).c_str(), "goldFont.fnt");
102102
attemptsLabel->setScale(0.8f);
103103
attemptsLabel->setPosition(timeLabel->getPositionX(), timeLabel->getPositionY() + 40);
104104
attemptsLabel->setID("attempts-label"_spr);
105105
m_mainLayer->addChild(attemptsLabel);
106-
const auto jumpsLabel = cocos2d::CCLabelBMFont::create(("Jumps: " + std::to_string(playLayer->m_jumps)).c_str(), "goldFont.fnt");
106+
CCLabelBMFont* jumpsLabel = CCLabelBMFont::create(("Jumps: " + std::to_string(playLayer->m_jumps)).c_str(), "goldFont.fnt");
107107
jumpsLabel->setScale(0.8f);
108108
jumpsLabel->setPosition({timeLabel->getPositionX(), timeLabel->getPositionY() + 20});
109109
jumpsLabel->setID("jumps-label"_spr);
@@ -173,7 +173,7 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
173173
}
174174
}
175175
void applyRandomQuoteAndFont(PlayLayer* playLayer, GJGameLevel* theLevel) {
176-
auto endTextLabel = typeinfo_cast<CCLabelBMFont*>(getChildByIDRecursive("end-text"));
176+
CCLabelBMFont* endTextLabel = typeinfo_cast<CCLabelBMFont*>(getChildByIDRecursive("end-text"));
177177
if (!endTextLabel) return;
178178

179179
const int64_t fontID = Mod::get()->getSettingValue<int64_t>("customFont");
@@ -185,7 +185,7 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
185185
endTextLabel->setFntFile(fmt::format("gjFont{:02d}.fnt", fontID).c_str());
186186
}
187187

188-
Manager* manager = managerMacro;
188+
const Manager* manager = managerMacro;
189189
if (manager->isCompactEndscreen) endTextLabel->setPositionX(manager->compactEndscreenFallbackPosition);
190190

191191
std::string randomString = !manager->customQuotes.empty() && getModBool("customTextsOnly") ? manager->grabRandomString(manager->customQuotes) : manager->grabRandomString();
@@ -238,8 +238,8 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
238238

239239
CCMenu* modsListMenu = CCMenu::create();
240240
modsListMenu->setContentSize({33, 33});
241-
modsListMenu->setPosition(m_listLayer->getPosition()); // i know this sounds like a crackpot position but it fits perfectly (im ignoring practice mode bc who tf wanna show that)
242241
modsListMenu->ignoreAnchorPointForPosition(false);
242+
modsListMenu->setPosition(m_listLayer->getPosition()); // i know this sounds like a crackpot position but it fits perfectly (im ignoring practice mode bc who tf wanna show that)
243243
modsListMenu->addChildAtPosition(modsListButton, Anchor::Center);
244244

245245
this->m_mainLayer->addChild(modsListMenu);

0 commit comments

Comments
 (0)