mirror of
https://github.com/rlabrecque/SteamworksSDK.git
synced 2026-10-10 09:33:04 +08:00
v1.41
This commit is contained in:
@@ -71,7 +71,7 @@ extern "C" void __cdecl SteamAPIDebugTextHook( int nSeverity, const char *pchDeb
|
||||
{
|
||||
// place to set a breakpoint for catching API errors
|
||||
int x = 3;
|
||||
x = x;
|
||||
(void)x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,23 +13,63 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
CMainMenu::CMainMenu( IGameEngine *pGameEngine ) : CBaseMenu<EClientGameState>( pGameEngine )
|
||||
CMainMenu::CMainMenu( IGameEngine *pGameEngine ) : CBaseMenu<EClientGameState>( pGameEngine ), m_callbackParentalSettingsChanged( this, &CMainMenu::OnParentalSettingsChanged )
|
||||
{
|
||||
SetupMenu();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Add relevant menu entries, honoring parental settings
|
||||
//-----------------------------------------------------------------------------
|
||||
void CMainMenu::SetupMenu()
|
||||
{
|
||||
ISteamParentalSettings *pSettings = SteamParentalSettings();
|
||||
|
||||
AddMenuItem( MenuItem_t( "Start New Server", k_EClientGameStartServer ) );
|
||||
AddMenuItem( MenuItem_t( "Find LAN Servers", k_EClientFindLANServers ) );
|
||||
AddMenuItem( MenuItem_t( "Find Internet Servers", k_EClientFindInternetServers ) );
|
||||
AddMenuItem( MenuItem_t( "Create Lobby", k_EClientCreatingLobby ) );
|
||||
AddMenuItem( MenuItem_t( "Find Lobby", k_EClientFindLobby ) );
|
||||
AddMenuItem( MenuItem_t( "Instructions", k_EClientGameInstructions ) );
|
||||
AddMenuItem( MenuItem_t( "Stats and Achievements", k_EClientStatsAchievements ) );
|
||||
AddMenuItem( MenuItem_t( "Leaderboards", k_EClientLeaderboards ) );
|
||||
AddMenuItem( MenuItem_t( "Friends List", k_EClientFriendsList ) );
|
||||
AddMenuItem( MenuItem_t( "Group chat room", k_EClientClanChatRoom ) );
|
||||
if ( !pSettings->BIsFeatureBlocked( k_EFeatureProfile ) )
|
||||
{
|
||||
AddMenuItem( MenuItem_t( "Stats and Achievements", k_EClientStatsAchievements ) );
|
||||
}
|
||||
AddMenuItem( MenuItem_t( "Leaderboards", k_EClientLeaderboards ) );
|
||||
|
||||
if ( !pSettings->BIsFeatureBlocked( k_EFeatureFriends ) )
|
||||
{
|
||||
AddMenuItem( MenuItem_t( "Friends List", k_EClientFriendsList ) );
|
||||
AddMenuItem( MenuItem_t( "Group chat room", k_EClientClanChatRoom ) );
|
||||
}
|
||||
AddMenuItem( MenuItem_t( "Remote Storage", k_EClientRemoteStorage ) );
|
||||
AddMenuItem( MenuItem_t( "Write Minidump", k_EClientMinidump ) );
|
||||
AddMenuItem( MenuItem_t( "Web Callback", k_EClientWebCallback ) );
|
||||
|
||||
if ( !pSettings->BIsFeatureBlocked( k_EFeatureBrowser ) )
|
||||
{
|
||||
AddMenuItem( MenuItem_t( "Web Callback", k_EClientWebCallback ) );
|
||||
}
|
||||
|
||||
AddMenuItem( MenuItem_t( "Music Player", k_EClientMusic ) );
|
||||
AddMenuItem( MenuItem_t( "Workshop Items", k_EClientWorkshop ) );
|
||||
AddMenuItem( MenuItem_t( "HTML Page", k_EClientHTMLSurface ) );
|
||||
if ( !pSettings->BIsFeatureBlocked( k_EFeatureCommunity ) )
|
||||
{
|
||||
AddMenuItem( MenuItem_t( "Workshop Items", k_EClientWorkshop ) );
|
||||
}
|
||||
|
||||
if ( !pSettings->BIsFeatureBlocked( k_EFeatureBrowser ) )
|
||||
{
|
||||
AddMenuItem( MenuItem_t( "HTML Page", k_EClientHTMLSurface ) );
|
||||
}
|
||||
AddMenuItem( MenuItem_t( "Exit Game", k_EClientGameExiting ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback for a change in parental settings. Rebuild menu.
|
||||
//-----------------------------------------------------------------------------
|
||||
void CMainMenu::OnParentalSettingsChanged( SteamParentalSettingsChanged_t *pParam )
|
||||
{
|
||||
ClearMenuItems();
|
||||
SetupMenu();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,11 @@ class CMainMenu : public CBaseMenu<EClientGameState>
|
||||
public:
|
||||
// Constructor
|
||||
CMainMenu( IGameEngine *pGameEngine );
|
||||
|
||||
void SetupMenu();
|
||||
|
||||
private:
|
||||
STEAM_CALLBACK( CMainMenu, OnParentalSettingsChanged, SteamParentalSettingsChanged_t, m_callbackParentalSettingsChanged );
|
||||
};
|
||||
|
||||
#endif // MAINMENU_H
|
||||
Reference in New Issue
Block a user