diff --git a/libsocial/include/Achievements.hpp b/libsocial/include/Achievements.hpp index 3c724dc8d..2ebe504a9 100644 --- a/libsocial/include/Achievements.hpp +++ b/libsocial/include/Achievements.hpp @@ -66,6 +66,8 @@ struct AchievementImage final cro::FloatRect textureRect; }; +class MonthlyChallenge; + //base class for different implementations class AchievementImpl { @@ -131,6 +133,8 @@ class Achievements final static void refreshGlobalStats() {} + static MonthlyChallenge* getMonthlyChallenge() { return nullptr; } + private: static AchievementImpl* m_impl; static bool m_active; diff --git a/libsocial/include/Social.hpp b/libsocial/include/Social.hpp index 3e71d2ffb..fa431771e 100644 --- a/libsocial/include/Social.hpp +++ b/libsocial/include/Social.hpp @@ -100,11 +100,12 @@ class Social final LevelUp, XPAwarded, OverlayActivated, - PlayerAchievement + PlayerAchievement, //as in we should cheer, not an actual achievement + MonthlyProgress }type = LevelUp; - std::int32_t level = 0; - std::int32_t reason = -1; - std::uint64_t playerID = 0; + std::int32_t level = 0; //if monthly progress then current value + std::int32_t reason = -1; //if monthly progress then target value + std::uint64_t playerID = 0; //id of monthly challenge }; struct ProgressData final diff --git a/samples/golf/buildnumber.h b/samples/golf/buildnumber.h index 4937703af..afb073da7 100644 --- a/samples/golf/buildnumber.h +++ b/samples/golf/buildnumber.h @@ -3,7 +3,7 @@ #ifndef BUILD_NUMBER_H_ #define BUILD_NUMBER_H_ -#define BUILDNUMBER 1018 -#define BUILDNUMBER_STR "1018" +#define BUILDNUMBER 1021 +#define BUILDNUMBER_STR "1021" #endif /* BUILD_NUMBER_H_ */ diff --git a/samples/golf/src/GolfGame.cpp b/samples/golf/src/GolfGame.cpp index c93c90cb7..e19cf0ef5 100644 --- a/samples/golf/src/GolfGame.cpp +++ b/samples/golf/src/GolfGame.cpp @@ -722,9 +722,9 @@ bool GolfGame::initialise() #ifdef CRO_DEBUG_ //m_stateStack.pushState(StateID::DrivingRange); //can't go straight to this because menu needs to parse avatar data //m_stateStack.pushState(StateID::Bush); - //m_stateStack.pushState(StateID::Clubhouse); + m_stateStack.pushState(StateID::Clubhouse); //m_stateStack.pushState(StateID::SplashScreen); - m_stateStack.pushState(StateID::Menu); + //m_stateStack.pushState(StateID::Menu); //m_stateStack.pushState(StateID::SQLite); #else m_stateStack.pushState(StateID::SplashScreen); diff --git a/samples/golf/src/golf/MenuCreation.cpp b/samples/golf/src/golf/MenuCreation.cpp index 2cea74f09..ebd30eb29 100644 --- a/samples/golf/src/golf/MenuCreation.cpp +++ b/samples/golf/src/golf/MenuCreation.cpp @@ -2064,18 +2064,20 @@ void MenuState::createLobbyMenu(cro::Entity parent, std::uint32_t mouseEnter, st entity.getComponent().setPrevIndex(LobbyCourseB, LobbyCourseB); // and this entity.getComponent().callbacks[cro::UIInput::Selected] = m_courseSelectCallbacks.selectHighlight; entity.getComponent().callbacks[cro::UIInput::Unselected] = m_courseSelectCallbacks.unselectHighlight; -#ifdef USE_GNS entity.getComponent().callbacks[cro::UIInput::ButtonUp] = m_uiScene.getSystem()->addCallback( [&](cro::Entity, const cro::ButtonEvent& evt) { if (activated(evt)) { +#ifdef USE_GNS requestStackPush(StateID::Leaderboard); +#else + cro::Util::String::parseURL("https://steamcommunity.com/stats/2173760/leaderboards/10082641/"); +#endif m_audioEnts[AudioID::Accept].getComponent().play(); } } ); -#endif entity.addComponent().ID = CommandID::Menu::UIElement; entity.addComponent().active = true; entity.getComponent().function = infoButtonEnable;