void CPointBonusMapsAccessor::Activate( void ) { BaseClass::Activate(); CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { m_pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); } }
void BonusMapChallengeObjectives( int &iBronze, int &iSilver, int &iGold ) { CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { IGameUI *pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); if ( pGameUI ) { pGameUI->BonusMapChallengeObjectives( iBronze, iSilver, iGold ); } } }
void BonusMapChallengeNames( char *pchFileName, char *pchMapName, char *pchChallengeName ) { CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { IGameUI *pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); if ( pGameUI ) { pGameUI->BonusMapChallengeNames( pchFileName, pchMapName, pchChallengeName ); } } }
virtual void Init() { CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { IGameUI *pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); if ( NULL != pGameUI ) { // insert stats summary panel as the loading background dialog CSDK_Loading_Panel *pPanel = GSDKLoadingPanel(); pPanel->InvalidateLayout( false, true ); pPanel->SetVisible( false ); pPanel->MakePopup( false ); pGameUI->SetLoadingBackgroundDialog( pPanel->GetVPanel() ); #if 0 // add ASI logo to main menu CSDK_Logo_Panel *pLogo = new CSDK_Logo_Panel( NULL, "ASILogo" ); vgui::VPANEL GameUIRoot = enginevgui->GetPanel( PANEL_GAMEUIDLL ); pLogo->SetParent( GameUIRoot ); g_hLogoPanel = pLogo; #endif // 0 } } // //CASW_VGUI_Debug_Panel *pDebugPanel = new CASW_VGUI_Debug_Panel( GetViewport(), "ASW Debug Panel" ); //g_hDebugPanel = pDebugPanel; // Skip over BaseClass!!! BaseClass::BaseClass::Init(); // Load up the combine control panel scheme if ( !g_hVGuiCombineScheme ) { g_hVGuiCombineScheme = vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL ), IsXbox() ? "resource/ClientScheme.res" : "resource/CombinePanelScheme.res", "CombineScheme" ); if (!g_hVGuiCombineScheme) { Warning( "Couldn't load combine panel scheme!\n" ); } } }
bool CTFMainMenu::LoadGameUI() { if (!gameui) { CreateInterfaceFn gameUIFactory = g_GameUIDLL.GetFactory(); if (gameUIFactory) { gameui = (IGameUI *)gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL); if (!gameui) { return false; } } else { return false; } } return true; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void ClientModeTFNormal::Init() { m_pMenuEngyBuild = ( CHudMenuEngyBuild * )GET_HUDELEMENT( CHudMenuEngyBuild ); Assert( m_pMenuEngyBuild ); m_pMenuEngyDestroy = ( CHudMenuEngyDestroy * )GET_HUDELEMENT( CHudMenuEngyDestroy ); Assert( m_pMenuEngyDestroy ); m_pMenuSpyDisguise = ( CHudMenuSpyDisguise * )GET_HUDELEMENT( CHudMenuSpyDisguise ); Assert( m_pMenuSpyDisguise ); m_pMenuWeaponSet = (CHudMenuWeaponSet *)GET_HUDELEMENT(CHudMenuWeaponSet); Assert(m_pMenuWeaponSet); m_pFreezePanel = ( CTFFreezePanel * )GET_HUDELEMENT( CTFFreezePanel ); Assert( m_pFreezePanel ); CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { m_pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); if ( NULL != m_pGameUI ) { // insert stats summary panel as the loading background dialog CTFStatsSummaryPanel *pPanel = GStatsSummaryPanel(); pPanel->InvalidateLayout( false, true ); pPanel->SetVisible( false ); pPanel->MakePopup( false ); m_pGameUI->SetLoadingBackgroundDialog( pPanel->GetVPanel() ); } } #if defined( _X360 ) m_pScoreboard = (CTFClientScoreBoardDialog *)( gViewPortInterface->FindPanelByName( PANEL_SCOREBOARD ) ); Assert( m_pScoreboard ); #endif BaseClass::Init(); }
void BonusMapChallengeUpdate( const char *pchFileName, const char *pchMapName, const char *pchChallengeName, int iBest ) { CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory(); if ( gameUIFactory ) { IGameUI *pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL ); if ( pGameUI ) { pGameUI->BonusMapChallengeUpdate( pchFileName, pchMapName, pchChallengeName, iBest ); int piNumMedals[ 3 ]; pGameUI->BonusMapNumMedals( piNumMedals ); IGameEvent *event = gameeventmanager->CreateEvent( "challenge_map_complete" ); if ( event ) { event->SetInt( "numbronze", piNumMedals[ 0 ] ); event->SetInt( "numsilver", piNumMedals[ 1 ] ); event->SetInt( "numgold", piNumMedals[ 2 ] ); gameeventmanager->FireEvent( event ); } } } }
//----------------------------------------------------------------------------- // Purpose: Destructor //----------------------------------------------------------------------------- CTFMainMenu::~CTFMainMenu() { m_pPanels.RemoveAll(); gameui = NULL; g_GameUIDLL.Unload(); }