I fixed something

This commit is contained in:
LazyByteDev
2026-03-02 06:44:31 -05:00
parent e817cdafb3
commit c719ff9cbb
14 changed files with 23 additions and 9 deletions

View File

@@ -25,7 +25,12 @@ AchievementPopup::AchievementPopup(Minecraft *mc)
void AchievementPopup::popup(Achievement *ach)
{
title = I18n::get(L"achievement.get");
desc = ach->name;
if (title == L"achievement.get")
title = L"Achievement Get!";
desc = I18n::get(ach->name);
if (desc == ach->name)
desc = ach->getDescription();
startTime = System::currentTimeMillis();
this->ach = ach;
isHelper = false;

View File

@@ -619,11 +619,11 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
Windows::Xbox::ApplicationModel::Help::Show(user);
}
break;
#elif TO_BE_IMPLEMENTED
#endif
case BUTTON_PAUSE_ACHIEVEMENTS:
// guests can't look at achievements
if(ProfileManager.IsGuest(pNotifyPressData->UserIndex))
if(ProfileManager.IsGuest(m_iPad))
{
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
@@ -631,10 +631,10 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
}
else
{
XShowAchievementsUI( pNotifyPressData->UserIndex );
XShowAchievementsUI( m_iPad );
}
break;
#endif
case BUTTON_PAUSE_HELPANDOPTIONS:
ui.NavigateToScene(m_iPad,eUIScene_HelpAndOptionsMenu);

View File

@@ -80,9 +80,14 @@ HRESULT XPartyGetUserList(XPARTY_USER_LIST *pUserList) { return S_OK; }
DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA *pContentData, PBYTE pbThumbnail, PDWORD pcbThumbnail, PXOVERLAPPED *pOverlapped) { return 0; }
void XShowAchievementsUI(int i)
{
Minecraft *minecraft = Minecraft::GetInstance();
if (minecraft && i >= 0 && i < 4 && minecraft->stats[i] != NULL)
minecraft->setScreen(new AchievementScreen(minecraft->stats[i]));
{
minecraft->setScreen(NULL);
minecraft->setScreen(new AchievementScreen(minecraft->stats[i]));
}
}
DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; }

View File

@@ -609,6 +609,7 @@ bool LocalPlayer::startCrafting(int x, int y, int z)
bool LocalPlayer::startEnchanting(int x, int y, int z)
{
bool success = app.LoadEnchantingMenu(GetXboxPad(), inventory, x, y, z, level );
if( success ) ui.PlayUISFX(eSFX_Press);
//minecraft.setScreen(new EnchantmentScreen(inventory, level, x, y, z));

View File

@@ -9,6 +9,8 @@
#include "..\Minecraft.World\net.minecraft.world.level.h"
#include "..\Minecraft.World\net.minecraft.stats.h"
#include "..\Minecraft.Client\LocalPlayer.h"
#include "AchievementScreen.h"
#include "StatsScreen.h"
PauseScreen::PauseScreen()
{
@@ -65,11 +67,11 @@ void PauseScreen::buttonClicked(Button button)
if (button.id == 5)
{
// minecraft->setScreen(new AchievementScreen(minecraft->stats)); // 4J TODO - put back
minecraft->setScreen(new AchievementScreen(minecraft->stats[button.id])); // 4J TODO - put back
}
if (button.id == 6)
{
// minecraft->setScreen(new StatsScreen(this, minecraft->stats)); // 4J TODO - put back
minecraft->setScreen(new StatsScreen(this, minecraft->stats[button.id])); // 4J TODO - put back
}
}

View File

@@ -844,6 +844,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
freopen("CONIN$", "r", stdin);
std::ios::sync_with_stdio(true);
#endif
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);

View File

@@ -60,7 +60,7 @@ wstring Achievement::getDescription()
{
if (descFormatter != NULL)
{
return descFormatter->format(desc);
return desc;
}
return desc;
}