mirror of
https://github.com/rlabrecque/SteamworksSDK.git
synced 2026-10-10 09:33:04 +08:00
v1.54
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "steam/steamencryptedappticket.h"
|
||||
#include "RemotePlay.h"
|
||||
#include "ItemStore.h"
|
||||
#include "OverlayExamples.h"
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
#else
|
||||
@@ -170,6 +171,8 @@ void CSpaceWarClient::Init( IGameEngine *pGameEngine )
|
||||
m_pItemStore = new CItemStore( pGameEngine );
|
||||
m_pItemStore->LoadItemsWithPrices();
|
||||
|
||||
m_pOverlayExamples = new COverlayExamples( pGameEngine );
|
||||
|
||||
LoadWorkshopItems();
|
||||
}
|
||||
|
||||
@@ -1047,6 +1050,15 @@ void CSpaceWarClient::OnMenuSelection( PurchaseableItem_t selection )
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Handles menu actions when viewing Overlay Examples
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSpaceWarClient::OnMenuSelection( OverlayExample_t selection )
|
||||
{
|
||||
m_pOverlayExamples->OnMenuSelection( selection );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: For a player in game, set the appropriate rich presence keys for display
|
||||
// in the Steam friends list and return the value for steam_display
|
||||
@@ -1234,6 +1246,12 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew )
|
||||
m_pItemStore->Show();
|
||||
SteamFriends()->SetRichPresence( "status", "Viewing Item Store" );
|
||||
}
|
||||
else if ( m_eGameState == k_EClientOverlayAPI )
|
||||
{
|
||||
// we've switched to the item store
|
||||
m_pOverlayExamples->Show();
|
||||
SteamFriends()->SetRichPresence( "status", "Viewing Overlay API Examples" );
|
||||
}
|
||||
|
||||
if ( pchSteamRichPresenceDisplay != NULL )
|
||||
{
|
||||
@@ -1755,6 +1773,14 @@ void CSpaceWarClient::RunFrame()
|
||||
if (bEscapePressed)
|
||||
SetGameState(k_EClientGameMenu);
|
||||
break;
|
||||
|
||||
case k_EClientOverlayAPI:
|
||||
m_pStarField->Render();
|
||||
m_pOverlayExamples->RunFrame();
|
||||
|
||||
if ( bEscapePressed )
|
||||
SetGameState( k_EClientGameMenu );
|
||||
break;
|
||||
|
||||
default:
|
||||
OutputDebugString( "Unhandled game state in CSpaceWar::RunFrame\n" );
|
||||
|
||||
Reference in New Issue
Block a user