Skip to content

Commit

Permalink
Added BetterProgression leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouca committed Jun 18, 2024
1 parent 100aa82 commit b153ec6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Binary file added resources/better_progression.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions src/MoreLeaderboards/MoreLeaderboards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ void MoreLeaderboards::startLoadingMore() {
type = "platformerDemonsInsane";
} else if (g_tab == StatsListType::platformerDemonsExtreme) {
type = "platformerDemonsExtreme";
} else if (g_tab == StatsListType::BetterProgression) {
type = "betterProgression";
}

const geode::utils::MiniFunction<void(std::string const&)> expect = [this](std::string const& error) {
Expand Down Expand Up @@ -715,6 +717,8 @@ void MoreLeaderboards::changeTabPage() {
platformer_sprite->setPositionX(30);
platformer_sprite->setScale(1.2f);

auto better_progression = CCSprite::create("better_progression.png"_spr);

auto easydemon_sprite_classic = CCSprite::createWithSpriteFrameName("diffIcon_07_btn_001.png");
easydemon_sprite_classic->addChild(classic_sprite);
auto mediumdemon_sprite_classic = CCSprite::createWithSpriteFrameName("diffIcon_08_btn_001.png");
Expand Down Expand Up @@ -787,12 +791,12 @@ void MoreLeaderboards::changeTabPage() {
case 1:
g_tab = StatsListType::classicDemonsEasy;

m_tab2 = NewTabButton::create(TabBaseColor::Unselected, TabBaseColor::Selected, CCSprite::create(), this, menu_selector(MoreLeaderboards::onTab));
m_tab2->setPosition(-140.f, 132);
m_tab2->setTag(static_cast<int>(StatsListType::classicDemonsEasy));
m_tab2->setZOrder(30);
m_tab2->setScale(0.8f);
m_menu->addChild(m_tab2);
m_tab1 = NewTabButton::create(TabBaseColor::Unselected, TabBaseColor::Selected, better_progression, this, menu_selector(MoreLeaderboards::onTab));
m_tab1->setPosition(-140.f, 132);
m_tab1->setTag(static_cast<int>(StatsListType::BetterProgression));
m_tab1->setZOrder(30);
m_tab1->setScale(0.8f);
m_menu->addChild(m_tab1);

m_tab2 = NewTabButton::create(TabBaseColor::Unselected, TabBaseColor::Selected, easydemon_sprite_classic, this, menu_selector(MoreLeaderboards::onTab));
m_tab2->setPosition(-86.f, 132);
Expand Down
3 changes: 2 additions & 1 deletion src/MoreLeaderboards/MoreLeaderboards.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ enum class StatsListType {
platformerDemonsMedium,
platformerDemonsHard,
platformerDemonsInsane,
platformerDemonsExtreme
platformerDemonsExtreme,
BetterProgression
};

class MoreLeaderboards : public CCLayer {
Expand Down

0 comments on commit b153ec6

Please sign in to comment.