feat. leaderboard + fix for building on linux
This commit is contained in:
@@ -954,6 +954,13 @@ void CMinecraftApp::InitGameSettings()
|
||||
SetDefaultOptions(pProfileSettings,i,false);
|
||||
|
||||
#endif
|
||||
|
||||
Minecraft* minecraft = Minecraft::GetInstance();
|
||||
if (minecraft != nullptr && minecraft->stats[i] != nullptr)
|
||||
{
|
||||
minecraft->stats[i]->clear();
|
||||
minecraft->stats[i]->parse(GameSettingsA[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "../../Minecraft.h"
|
||||
#include "../../Options.h"
|
||||
#include "../../Minecraft.World/Level.h"
|
||||
#include "../../MultiplayerLevel.h"
|
||||
#include "../../MultiPlayerLevel.h"
|
||||
#include "../../../Minecraft.World/Enchantment.h"
|
||||
#ifdef __ORBIS__
|
||||
#include <pad.h>
|
||||
|
||||
@@ -424,6 +424,10 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool
|
||||
|
||||
void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
|
||||
{
|
||||
// load before so real stats cant get overwritten afterwards
|
||||
m_labelInfo.setLabel(app.GetString(IDS_LEADERBOARD_LOADING));
|
||||
m_labelInfo.setVisible(true);
|
||||
|
||||
//If startIndex == -1, then use default values
|
||||
if( startIndex == -1 )
|
||||
{
|
||||
@@ -490,10 +494,6 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//Show the loading message
|
||||
m_labelInfo.setLabel(app.GetString(IDS_LEADERBOARD_LOADING));
|
||||
m_labelInfo.setVisible(true);
|
||||
}
|
||||
|
||||
bool UIScene_LeaderboardsMenu::OnStatsReadComplete(LeaderboardManager::eStatsReturn retIn, int numResults, LeaderboardManager::ViewOut results)
|
||||
|
||||
@@ -517,6 +517,17 @@ void UIScene_LoadMenu::tick()
|
||||
m_MoreOptionsParams.bNaturalRegeneration = app.GetGameHostOption(uiHostOptions, eGameHostOption_NaturalRegeneration);
|
||||
m_MoreOptionsParams.bDoDaylightCycle = app.GetGameHostOption(uiHostOptions, eGameHostOption_DoDaylightCycle);
|
||||
|
||||
unsigned int saveDifficulty = app.GetGameHostOption(uiHostOptions, eGameHostOption_Difficulty);
|
||||
if (saveDifficulty <= 3)
|
||||
{
|
||||
m_CurrentDifficulty = static_cast<unsigned char>(saveDifficulty);
|
||||
app.SetGameSettings(m_iPad, eGameSetting_Difficulty, m_CurrentDifficulty);
|
||||
|
||||
WCHAR difficultyLabel[256];
|
||||
swprintf((WCHAR*)difficultyLabel, 256, L"%ls: %ls", app.GetString(IDS_SLIDER_DIFFICULTY), app.GetString(m_iDifficultyTitleSettingA[m_CurrentDifficulty]));
|
||||
m_sliderDifficulty.init(difficultyLabel, eControl_Difficulty, 0, 3, m_CurrentDifficulty);
|
||||
}
|
||||
|
||||
bool cheatsOn = m_MoreOptionsParams.bHostPrivileges;
|
||||
if (!cheatsOn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user