initial GamepadUI from EZ2

This commit is contained in:
2024-04-13 19:58:55 +03:00
parent 29985681a1
commit 19ce478dd0
49 changed files with 11335 additions and 49 deletions

View File

@@ -820,7 +820,7 @@ void CVideoMode_Common::SetupStartupGraphic()
// loading.vtf
buf.Clear(); // added this Clear() because we saw cases where LoadVTF was not emptying the buf fully in the above section
const char* loading = "materials/console/startup_loading.vtf";
if ( IsSteamDeck() )
if ( IsGamepadUI() )
loading = "materials/gamepadui/game_logo.vtf";
m_pLoadingTexture = LoadVTF( buf, loading );
if ( !m_pLoadingTexture )
@@ -887,7 +887,7 @@ void CVideoMode_Common::DrawStartupGraphic()
IMaterial *pMaterial = g_pMaterialSystem->CreateMaterial( "__background", pVMTKeyValues );
const char* loading = "console/startup_loading.vtf";
if ( IsSteamDeck() )
if ( IsGamepadUI() )
loading = "gamepadui/game_logo.vtf";
pVMTKeyValues = new KeyValues( "UnlitGeneric" );
@@ -896,7 +896,7 @@ void CVideoMode_Common::DrawStartupGraphic()
pVMTKeyValues->SetInt( "$ignorez", 1 );
pVMTKeyValues->SetInt( "$nofog", 1 );
pVMTKeyValues->SetInt( "$no_fullbright", 1 );
pVMTKeyValues->SetInt( "$nocull", 1 );
pVMTKeyValues->SetInt( "$nocull", 1 );
IMaterial *pLoadingMaterial = g_pMaterialSystem->CreateMaterial( "__loading", pVMTKeyValues );
int w = GetModeStereoWidth();
@@ -929,7 +929,7 @@ void CVideoMode_Common::DrawStartupGraphic()
slide = 0;
DrawScreenSpaceRectangle( pMaterial, 0, 0+slide, w, h-50, 0, 0, tw-1, th-1, tw, th, NULL,1,1,depth );
if ( !IsSteamDeck() )
if ( !IsGamepadUI() )
DrawScreenSpaceRectangle( pLoadingMaterial, w-lw, h-lh+slide/2, lw, lh, 0, 0, lw-1, lh-1, lw, lh, NULL,1,1,depth-0.1 );
else
// TODO: Steam Deck
@@ -978,11 +978,15 @@ void CVideoMode_Common::DrawStartupGraphic()
pRenderContext->ClearColor3ub( 0, 0, 0 );
pRenderContext->ClearBuffers( true, true, true );
DrawScreenSpaceRectangle( pMaterial, 0, 0, w, h, 0, 0, tw-1, th-1, tw, th, NULL,1,1,depth );
DrawScreenSpaceRectangle( pLoadingMaterial, w-lw, h-lh, lw, lh, 0, 0, lw-1, lh-1, lw, lh, NULL,1,1,depth );
if(!IsGamepadUI())
DrawScreenSpaceRectangle( pLoadingMaterial, w-lw, h-lh, lw, lh, 0, 0, lw-1, lh-1, lw, lh, NULL,1,1,depth );
g_pMaterialSystem->SwapBuffers();
}
}
#ifdef DX_TO_GL_ABSTRACTION
g_pMaterialSystem->DoStartupShaderPreloading();
#endif

View File

@@ -613,7 +613,7 @@ void CEngineVGui::Init()
return;
}
if ( IsX360() || IsSteamDeck() )
if ( IsX360() || IsGamepadUI() )
{
CCommand ccommand;
if ( CL_ShouldLoadBackgroundLevel( ccommand ) )
@@ -1273,12 +1273,18 @@ void CEngineVGui::OnLevelLoadingStarted()
}
}
if ( IsX360() || IsSteamDeck() )
if ( IsX360() || !IsGamepadUI() )
{
// TCR requirement, always!!!
m_bShowProgressDialog = true;
}
// i dont want gamepadui menu while loading
//if (IsGamepadUI())
//{
// m_bShowProgressDialog = false;
//}
// we've starting loading a level/connecting to a server
staticGameUIFuncs->OnLevelLoadingStarted( m_bShowProgressDialog );