@@ -207,17 +207,17 @@ class $modify(LevelInfo, LevelInfoLayer) {
207207 bool displayCollabLayers = AVAL_GEODE_MOD->getSettingValue <bool >(" collab-layers" );
208208
209209 // get main bg color layer
210- auto bg = this -> getChildByID (" background" );
210+ auto bg = getChildByID (" background" );
211211 auto background = as<CCSprite*>(bg);
212212
213213 // get level name node
214- auto nameText = this -> getChildByID (" title-label" );
214+ auto nameText = getChildByID (" title-label" );
215215 auto levelName = dynamic_cast <CCLabelBMFont*>(nameText);
216216
217217 // whether or not display for classics only
218218 bool onlyClassic = AVAL_GEODE_MOD->getSettingValue <bool >(" classic-only" ) && level->isPlatformer ();
219219
220- CCMenu* leftMenu = typeinfo_cast<CCMenu*>(this -> getChildByID (" left-side-menu" ));
220+ CCMenu* leftMenu = typeinfo_cast<CCMenu*>(getChildByID (" left-side-menu" ));
221221
222222 Project thisProj = getHandler->GetProject (level->m_levelID .value ());
223223
@@ -228,17 +228,12 @@ class $modify(LevelInfo, LevelInfoLayer) {
228228 auto showProjectInfo = AVAL_GEODE_MOD->getSettingValue <bool >(" show-proj-info" );
229229
230230 if (showProjectInfo) {
231- CCSprite* avalBtnSprite = CCSprite::createWithSpriteFrameName (" GJ_plainBtn_001.png" );
232- avalBtnSprite->setScale (0 .944f );
233-
234- CCSprite* avalBtnSpriteIcon = CCSprite::createWithSpriteFrameName (" button-logo.png" _spr);
235- avalBtnSpriteIcon->setPositionX (avalBtnSprite->getContentWidth () / 2 .025f );
236- avalBtnSpriteIcon->setPositionY (avalBtnSprite->getContentHeight () / 2 .f );
237- avalBtnSpriteIcon->ignoreAnchorPointForPosition (false );
238- avalBtnSpriteIcon->setAnchorPoint ({ 0.5 , 0.5 });
239- avalBtnSpriteIcon->setScale (0 .875f );
240-
241- avalBtnSprite->addChild (avalBtnSpriteIcon);
231+ CCSprite* avalBtnSprite = CircleButtonSprite::createWithSpriteFrameName (
232+ " button-logo.png" _spr,
233+ 1 .25f ,
234+ CircleBaseColor::Green,
235+ CircleBaseSize::Medium
236+ );
242237
243238 CCMenuItemSpriteExtra* avalBtn = CCMenuItemSpriteExtra::create (
244239 avalBtnSprite,
@@ -330,8 +325,8 @@ class $modify(LevelInfo, LevelInfoLayer) {
330325 bgSprite->setColor ({ 66 , 94 , 255 });
331326 bgSprite->setAnchorPoint ({ 0.5 , 0.5 });
332327 bgSprite->ignoreAnchorPointForPosition (false );
333- bgSprite->setContentSize ({ this -> getScaledContentWidth (), this -> getScaledContentWidth () });
334- bgSprite->setPosition ({ this -> getScaledContentWidth () / 2 , this -> getScaledContentHeight () / 2 });
328+ bgSprite->setContentSize ({ getScaledContentWidth (), getScaledContentWidth () });
329+ bgSprite->setPosition ({ getScaledContentWidth () / 2 , getScaledContentHeight () / 2 });
335330 bgSprite->setZOrder (background->getZOrder ());
336331 bgSprite->setID (" team_background" _spr);
337332
@@ -343,7 +338,7 @@ class $modify(LevelInfo, LevelInfoLayer) {
343338 bgThumbnail->setZOrder (background->getZOrder () + 1 );
344339 bgThumbnail->setID (" team_thumbnail" _spr);
345340
346- auto ogHeight = this -> getContentHeight ();
341+ auto ogHeight = getContentHeight ();
347342 auto thumbHeight = bgThumbnail->getContentHeight ();
348343
349344 // checks if the heights are valid before rescaling
@@ -354,12 +349,12 @@ class $modify(LevelInfo, LevelInfoLayer) {
354349 bgThumbnail->setScale (scaleFactor);
355350 };
356351
357- this -> addChild (bgThumbnail);
352+ addChild (bgThumbnail);
358353 } else {
359354 AVAL_LOG_ERROR (" Failed to load sprite: project-bg.png" );
360355 };
361356
362- this -> addChild (bgSprite);
357+ addChild (bgSprite);
363358 } else {
364359 AVAL_LOG_ERROR (" Failed to load sprite: game_bg_19_001.png" );
365360 };
@@ -402,11 +397,11 @@ class $modify(LevelInfo, LevelInfoLayer) {
402397 bgThumbnail->setOpacity (125 );
403398 bgThumbnail->setAnchorPoint ({ 0.5 , 0 });
404399 bgThumbnail->ignoreAnchorPointForPosition (false );
405- bgThumbnail->setPosition ({ this -> getContentWidth () / 2 , 0 });
400+ bgThumbnail->setPosition ({ getContentWidth () / 2 , 0 });
406401 bgThumbnail->setZOrder (background->getZOrder () + 1 );
407402 bgThumbnail->setID (" team_thumbnail" _spr);
408403
409- auto ogWidth = this -> getContentWidth ();
404+ auto ogWidth = getContentWidth ();
410405 auto scaledWidth = bgThumbnail->getContentWidth ();
411406
412407 if (ogWidth <= 0 || scaledWidth <= 0 ) {
@@ -418,7 +413,7 @@ class $modify(LevelInfo, LevelInfoLayer) {
418413 background->setZOrder (-5 );
419414 };
420415
421- this -> addChild (bgThumbnail);
416+ addChild (bgThumbnail);
422417 } else {
423418 AVAL_LOG_ERROR (" Failed to load sprite: fame-bg.png" );
424419 };
@@ -432,7 +427,7 @@ class $modify(LevelInfo, LevelInfoLayer) {
432427
433428 // when player presses the avalanche button
434429 void onAvalancheButton (CCObject * sender) {
435- ProjectInfoPopup::create ()->setProject (this -> m_level )->show ();
430+ ProjectInfoPopup::create ()->setProject (m_level)->show ();
436431 };
437432};
438433
@@ -449,7 +444,7 @@ class $modify(Level, LevelCell) {
449444 bool displayCollabCells = AVAL_GEODE_MOD->getSettingValue <bool >(" collab-cells" );
450445
451446 // get main bg color layer
452- auto color = this -> getChildByType <CCLayerColor>(0 );
447+ auto color = getChildByType<CCLayerColor>(0 );
453448
454449 // get level name text
455450 auto nameText = m_mainLayer->getChildByID (" level-name" );
@@ -518,7 +513,7 @@ class $modify(Level, LevelCell) {
518513 newColor->setID (" solo_color" _spr);
519514
520515 colorNode->removeMeAndCleanup ();
521- this -> addChild (newColor);
516+ addChild (newColor);
522517
523518 if (fame) Level::setFame (newColor, { 255 , 255 , 255 });
524519 } else {
@@ -541,7 +536,7 @@ class $modify(Level, LevelCell) {
541536 newColor->setID (" collab_color" _spr);
542537
543538 colorNode->removeMeAndCleanup ();
544- this -> addChild (newColor);
539+ addChild (newColor);
545540
546541 if (fame) Level::setFame (newColor, { 255 , 255 , 255 });
547542 } else {
@@ -572,7 +567,7 @@ class $modify(Level, LevelCell) {
572567 levelName->setScale (levelName->getScale () * scaleDownBy);
573568
574569 colorNode->removeMeAndCleanup ();
575- this -> addChild (newColor);
570+ addChild (newColor);
576571
577572 if (fame) Level::setFame (newColor, { 255 , 244 , 95 });
578573 } else {
@@ -595,7 +590,7 @@ class $modify(Level, LevelCell) {
595590 newColor->setID (" event_color" _spr);
596591
597592 colorNode->removeMeAndCleanup ();
598- this -> addChild (newColor);
593+ addChild (newColor);
599594
600595 if (fame) Level::setFame (newColor, { 85 , 249 , 255 });
601596 } else {
@@ -621,10 +616,10 @@ class $modify(Level, LevelCell) {
621616 fameGlow->setID (" fame" _spr);
622617
623618 // for compact lists
624- float reScale = (this -> m_height / fameGlow->getContentHeight ()) * this -> getScale ();
619+ float reScale = (m_height / fameGlow->getContentHeight ()) * getScale ();
625620 fameGlow->setScale (reScale);
626621
627- this -> addChild (fameGlow);
622+ addChild (fameGlow);
628623 } else {
629624 AVAL_LOG_ERROR (" Failed to load sprite: fame-glow.png" );
630625 };
@@ -647,7 +642,7 @@ class $modify(Pause, PauseLayer) {
647642 void customSetup () {
648643 PauseLayer::customSetup ();
649644
650- if (auto rightMenu = this -> getChildByID (" right-button-menu" )) {
645+ if (auto rightMenu = getChildByID (" right-button-menu" )) {
651646 if (m_fields->m_level ) {
652647 Project thisProj = getHandler->GetProject (m_fields->m_level ->m_levelID .value ());
653648
@@ -746,8 +741,8 @@ class $modify(Menu, MenuLayer) {
746741 AVAL_LOG_DEBUG (" Changelog alert disabled" );
747742 };
748743
749- auto winSizeX = this -> getScaledContentWidth ();
750- auto winSizeY = this -> getScaledContentHeight ();
744+ auto winSizeX = getScaledContentWidth ();
745+ auto winSizeY = getScaledContentHeight ();
751746
752747 bool showAvalButton = AVAL_GEODE_MOD->getSettingValue <bool >(" show-aval-featured" );
753748
@@ -757,7 +752,7 @@ class $modify(Menu, MenuLayer) {
757752 avalMenu->setPosition ({ winSizeX / 2 , (winSizeY / 2 ) - 70 .f });
758753 avalMenu->setScaledContentSize ({ winSizeX - 75 .f , 50 .f });
759754
760- this -> addChild (avalMenu);
755+ addChild (avalMenu);
761756
762757 auto avalBtnSprite = CCSprite::createWithSpriteFrameName (" button-logo-framed.png" _spr);
763758 avalBtnSprite->ignoreAnchorPointForPosition (false );
0 commit comments