Skip to content

Commit

Permalink
Moved region button
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouca committed Jun 4, 2024
1 parent 05c5eb9 commit 1c49a55
Showing 1 changed file with 15 additions and 27 deletions.
42 changes: 15 additions & 27 deletions src/MoreLeaderboards/MoreLeaderboards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,6 @@ bool MoreLeaderboards::init(std::string type) {
background->setZOrder(-1);
this->addChild(background);

// Change region
auto menu_region = CCMenu::create();

auto regionSpr = CCSprite::create(Mod::get()->expandSpriteName("earth_btn.png"));
regionSpr->setScale(.8f);
auto regionBtn = CCMenuItemSpriteExtra::create(
regionSpr,
this,
menu_selector(MoreLeaderboards::onMoreLeaderboards)
);
regionBtn->setPosition(239, 0);
menu_region->addChild(regionBtn);

this->addChild(menu_region);

// Corners
CCSprite* corner_left = CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
CCSprite* corner_right = CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png");
Expand All @@ -131,6 +116,21 @@ bool MoreLeaderboards::init(std::string type) {
this->addChild(menu);

if (type == "more") {
// Change region
auto menu_region = CCMenu::create();

auto regionSpr = CCSprite::create(Mod::get()->expandSpriteName("earth_btn.png"));
regionSpr->setScale(.8f);
auto regionBtn = CCMenuItemSpriteExtra::create(
regionSpr,
this,
menu_selector(MoreLeaderboards::onMoreLeaderboards)
);
regionBtn->setPosition(239, 0);
menu_region->addChild(regionBtn);

this->addChild(menu_region);

// create menus
m_menu = CCMenu::create();

Expand Down Expand Up @@ -276,18 +276,6 @@ void MoreLeaderboards::startLoadingMods() {
}
)
);

/*web::AsyncWebRequest()
.fetch("https://clarifygdps.com/gdutils/modslist.php")
.text()
.then([this](std::string const& data) {
fadeLoadingCircle();
handle_request_mods(data);
})
.expect([this](std::string const& error) {
fadeLoadingCircle();
});*/
};

void MoreLeaderboards::loadPageMods() {
Expand Down

0 comments on commit 1c49a55

Please sign in to comment.