chore: realign hud & x360 stuff
This commit is contained in:
1 parent
8f7ad6f080
commit
dc73daee70
45 files changed
+957
-2623
No files matched your search
@@ -50,7 +50,6 @@
|
||||
#include "..\Common\XUI\XUI_XZP_Icons.h"
|
||||
#include "..\Common\XUI\XUI_Controls.h"
|
||||
#include "..\Common\XUI\XUI_Scene_Win.h"
|
||||
#include "..\Common\XUI\XUI_HUD.h"
|
||||
#include "..\Common\XUI\XUI_DebugSetCamera.h"
|
||||
//#include "..\Common\XUI\XUI_TransferToXboxOne.h"
|
||||
|
||||
@@ -160,7 +159,6 @@
|
||||
#include "..\Common\XUI\XUI_XZP_Icons.h"
|
||||
#include "..\Common\XUI\XUI_Controls.h"
|
||||
#include "..\Common\XUI\XUI_Scene_Win.h"
|
||||
#include "..\Common\XUI\XUI_HUD.h"
|
||||
#include "..\Common\XUI\XUI_Scene_Anvil.h"
|
||||
#include "..\Common\XUI\XUI_Scene_Trading.h"
|
||||
#include "..\Common\XUI\XUI_Teleport.h"
|
||||
@@ -261,7 +259,6 @@ WCHAR *CConsoleMinecraftApp::wchSceneA[]=
|
||||
L"xuiscene_enchant",
|
||||
L"xuiscene_brewingstand",
|
||||
L"xuiscene_win",
|
||||
L"xuiscene_hud",
|
||||
L"xuiscene_trading",
|
||||
L"xuiscene_anvil",
|
||||
L"xuiscene_teleportmenu",
|
||||
@@ -517,8 +514,6 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
|
||||
if( FAILED( hr) ) return hr;
|
||||
hr = CScene_Win::Register();
|
||||
if( FAILED( hr) ) return hr;
|
||||
hr = CXuiSceneHud::Register();
|
||||
if( FAILED( hr) ) return hr;
|
||||
hr = CXuiSceneAnvil::Register();
|
||||
if( FAILED( hr) ) return hr;
|
||||
hr = CXuiSceneTrading::Register();
|
||||
@@ -563,7 +558,6 @@ HRESULT CConsoleMinecraftApp::UnregisterXuiClasses()
|
||||
CXuiSceneTrading::Unregister();
|
||||
CXuiSceneAnvil::Unregister();
|
||||
// CScene_TransferToXboxOne::Unregister();
|
||||
CXuiSceneHud::Unregister();
|
||||
CScene_Win::Unregister();
|
||||
CXuiCtrlMobEffect::Unregister();
|
||||
CXuiCtrlEnchantmentButtonText::Unregister();
|
||||
@@ -960,11 +954,6 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
|
||||
}
|
||||
|
||||
m_hCurrentChatScene[idx]=hScene;
|
||||
|
||||
XuiElementGetChildById( m_PlayerBaseScene[idx], L"XuiSceneHudRoot", &m_hCurrentHudScene[idx]);
|
||||
m_hFirstHudScene[idx]=m_hCurrentHudScene[idx];
|
||||
|
||||
ReloadHudScene(idx, false, true);
|
||||
}
|
||||
|
||||
// get the "Press START to join in" message
|
||||
@@ -1718,7 +1707,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
CXuiSceneBase::SetPlayerBaseScenePosition( idx, CXuiSceneBase::e_BaseScene_Fullscreen );
|
||||
}
|
||||
|
||||
if( eScene != eUIComponent_TutorialPopup && eScene != eUIComponent_Chat && eScene != eUIScene_HUD )
|
||||
if( eScene != eUIComponent_TutorialPopup && eScene != eUIComponent_Chat )
|
||||
{
|
||||
SetMenuDisplayed(idx,true);
|
||||
}
|
||||
@@ -1757,7 +1746,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
break;
|
||||
default:
|
||||
// some scenes are forced into fullscreen even though we are insplitscreen mode (saving)
|
||||
if(eScene==eUIComponent_TutorialPopup || eScene==eUIComponent_Chat || eScene==eUIScene_HUD)
|
||||
if(eScene==eUIComponent_TutorialPopup || eScene==eUIComponent_Chat)
|
||||
{
|
||||
hr = XuiSceneCreate(szResourceLocator,app.GetSceneName(eScene,true,bIsSplitscreen), initData, &hScene);
|
||||
}
|
||||
@@ -1803,18 +1792,6 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
|
||||
|
||||
m_hCurrentChatScene[iPad]=hScene;
|
||||
}
|
||||
else if( eScene == eUIScene_HUD )
|
||||
{
|
||||
hr = XuiSceneNavigateForward(m_hCurrentHudScene[iPad], FALSE, hScene, XUSER_INDEX_NONE);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
app.DebugPrintf("scene navigate fail");
|
||||
XuiDestroyObject(hScene);
|
||||
return hr;
|
||||
}
|
||||
|
||||
m_hCurrentHudScene[iPad]=hScene;
|
||||
}
|
||||
else
|
||||
{
|
||||
MemSect(5);
|
||||
@@ -2064,7 +2041,6 @@ HRESULT CConsoleMinecraftApp::CloseAllPlayersXuiScenes()
|
||||
{
|
||||
CloseXuiScenes(idx, true);
|
||||
ReloadChatScene(idx, false, true);
|
||||
ReloadHudScene(idx, false, true);
|
||||
}
|
||||
|
||||
return hr;
|
||||
@@ -2296,33 +2272,6 @@ void CConsoleMinecraftApp::ReloadChatScene(int iPad, bool bJoining /*= false*/,
|
||||
XuiElementSetPosition( m_hCurrentChatScene[iPad], &vPosition );
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::ReloadHudScene(int iPad, bool bJoining /*= false*/, bool bForce /*= false*/)
|
||||
{
|
||||
if(m_hFirstHudScene[iPad] == NULL || m_hCurrentHudScene[iPad] == NULL) return;
|
||||
|
||||
// Re-create the hud scene so it is the correct size. It starts without any visible lines.
|
||||
BOOL hudSceneVisible = FALSE;
|
||||
if( m_hFirstHudScene[iPad] != m_hCurrentHudScene[iPad] )
|
||||
{
|
||||
hudSceneVisible = XuiElementIsShown(m_hCurrentHudScene[iPad]);
|
||||
}
|
||||
|
||||
int iLocalPlayerC=GetLocalPlayerCount();
|
||||
// we need to decide whether to close the xui scene or just reposition it
|
||||
|
||||
if( bForce ||
|
||||
(bJoining && iLocalPlayerC==2) ||
|
||||
(!bJoining && iLocalPlayerC==1) ||
|
||||
m_hFirstHudScene[iPad] == m_hCurrentHudScene[iPad])
|
||||
{
|
||||
if( m_hFirstHudScene[iPad] != m_hCurrentHudScene[iPad] ) XuiSceneNavigateBack(m_hCurrentHudScene[iPad], m_hFirstHudScene[iPad],iPad);
|
||||
m_hCurrentHudScene[iPad] = m_hFirstHudScene[iPad];
|
||||
app.NavigateToScene(iPad,eUIScene_HUD,NULL,true);
|
||||
|
||||
XuiElementSetShow( m_hCurrentHudScene[iPad], hudSceneVisible);
|
||||
}
|
||||
}
|
||||
|
||||
void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pvOriginalPosition, int iPad, bool bAdjustXForSafeArea)
|
||||
{
|
||||
D3DXVECTOR3 vec;
|
||||
|
||||
Reference in new issue
Block a user