aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp58
1 files changed, 34 insertions, 24 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
index cad86dce..c036f7bf 100644
--- a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
@@ -140,6 +140,10 @@ void UIScene_JoinMenu::tick()
{
m_labelValues[eLabel_GameType].init( app.GetString(IDS_CREATIVE) );
}
+ else if(option == GameType::ADVENTURE->getId())
+ {
+ m_labelValues[eLabel_GameType].init( app.GetString(IDS_ADVENTURE) );
+ }
else
{
m_labelValues[eLabel_GameType].init( app.GetString(IDS_SURVIVAL) );
@@ -209,9 +213,9 @@ void UIScene_JoinMenu::tick()
UINT uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
#ifdef _XBOX_ONE
- ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_DISCONNECTED_SERVER_QUIT, uiIDA,1,m_iPad,ErrorDialogReturned,this, app.GetStringTable());
+ ui.RequestErrorMessage( IDS_CONNECTION_FAILED, IDS_DISCONNECTED_SERVER_QUIT, uiIDA,1,m_iPad,ErrorDialogReturned,this);
#else
- ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA,1,m_iPad,ErrorDialogReturned,this, app.GetStringTable());
+ ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA,1,m_iPad,ErrorDialogReturned,this);
#endif
}
@@ -307,7 +311,7 @@ void UIScene_JoinMenu::handlePress(F64 controlId, F64 childId)
ui.PlayUISFX(eSFX_Press);
#ifdef _DURANGO
- ProfileManager.CheckMultiplayerPrivileges(m_iPad, true, &checkPrivilegeCallback, this);
+ ProfileManager.CheckMultiplayerPrivileges(m_iPad, true, &checkPrivilegeCallback, (LPVOID)GetCallbackUniqueId());
#else
StartSharedLaunchFlow();
#endif
@@ -331,15 +335,18 @@ void UIScene_JoinMenu::handleFocusChange(F64 controlId, F64 childId)
#ifdef _DURANGO
void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad)
{
- UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)lpParam;
+ UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParam);
- if(hasPrivilege)
- {
- pClass->StartSharedLaunchFlow();
-}
- else
+ if(pClass)
{
- pClass->m_bIgnoreInput = false;
+ if(hasPrivilege)
+ {
+ pClass->StartSharedLaunchFlow();
+ }
+ else
+ {
+ pClass->m_bIgnoreInput = false;
+ }
}
}
#endif
@@ -355,7 +362,7 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
//ProfileManager.RequestSignInUI(false, false, false, true, false,&UIScene_JoinMenu::StartGame_SignInReturned, this,ProfileManager.GetPrimaryPad());
SignInInfo info;
info.Func = &UIScene_JoinMenu::StartGame_SignInReturned;
- info.lpParam = this;
+ info.lpParam = (LPVOID)GetCallbackUniqueId();
info.requireOnline = true;
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
}
@@ -363,24 +370,27 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
- UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)pParam;
+ UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
- if(bContinue==true)
+ if(pClass)
{
- // It's possible that the player has not signed in - they can back out
- if(ProfileManager.IsSignedIn(iPad))
+ if(bContinue==true)
{
- JoinGame(pClass);
+ // It's possible that the player has not signed in - they can back out
+ if(ProfileManager.IsSignedIn(iPad))
+ {
+ JoinGame(pClass);
+ }
+ else
+ {
+ pClass->m_bIgnoreInput=false;
+ }
}
else
{
pClass->m_bIgnoreInput=false;
}
}
- else
- {
- pClass->m_bIgnoreInput=false;
- }
return 0;
}
@@ -442,7 +452,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
+ ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive);
}
else
#endif
@@ -450,7 +460,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
- ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
+ ui.RequestErrorMessage( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
}
return;
}
@@ -495,7 +505,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
- ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
+ ui.RequestErrorMessage( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
}
else
{
@@ -530,7 +540,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
- ui.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
+ ui.RequestErrorMessage( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad());
exitReasonStringId = -1;
ui.NavigateToHomeMenu();