Add a way to configure which leaderboards are seen by the game.

This commit is contained in:
Mr_Goldberg 2019-08-03 18:55:08 -04:00
parent 7939796680
commit f4ab249f36
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
6 changed files with 92 additions and 9 deletions

View file

@ -53,6 +53,7 @@ Settings::Settings(CSteamID steam_id, CGameID game_id, std::string name, std::st
this->unlockAllDLCs = true;
this->offline = offline;
this->create_unknown_leaderboards = true;
}
CSteamID Settings::get_local_steam_id()
@ -193,3 +194,12 @@ std::string Settings::getAppInstallPath(AppId_t appID)
{
return app_paths[appID];
}
void Settings::setLeaderboard(std::string leaderboard, enum ELeaderboardSortMethod sort_method, enum ELeaderboardDisplayType display_type)
{
Leaderboard_config leader;
leader.sort_method = sort_method;
leader.display_type = display_type;
leaderboards[leaderboard] = leader;
}