本文整理汇总了C++中CDllDemandLoader::GetFactory方法的典型用法代码示例。如果您正苦于以下问题:C++ CDllDemandLoader::GetFactory方法的具体用法?C++ CDllDemandLoader::GetFactory怎么用?C++ CDllDemandLoader::GetFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDllDemandLoader
的用法示例。
在下文中一共展示了CDllDemandLoader::GetFactory方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BonusMapChallengeUpdate
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 )
{
int piNumMedals[ 3 ] = {0};
#if 0
pGameUI->BonusMapChallengeUpdate( pchFileName, pchMapName, pchChallengeName, iBest );
pGameUI->BonusMapNumMedals( piNumMedals );
#endif
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 );
}
}
}
}
示例2: Init
//====================================================================
//====================================================================
void InClientModeFullscreen::Init()
{
CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory();
if ( gameUIFactory )
{
IGameUI *pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL );
// Se ha cargado la librería con éxito
if ( pGameUI )
{
// TODO!
//pGameUI->SetLoadingBackgroundDialog( pPanel->GetVPanel() );
}
}
// Skip over 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" );
}
}
}
示例3: GetBasePanel
void CGameUI2::Initialize(CreateInterfaceFn appFactory)
{
MEM_ALLOC_CREDIT();
ConnectTier1Libraries(&appFactory, 1);
ConnectTier2Libraries(&appFactory, 1);
ConVar_Register(FCVAR_CLIENTDLL);
ConnectTier3Libraries(&appFactory, 1);
engine = static_cast<IVEngineClient*>(appFactory(VENGINE_CLIENT_INTERFACE_VERSION, nullptr));
enginesound = static_cast<IEngineSound*>(appFactory(IENGINESOUND_CLIENT_INTERFACE_VERSION, nullptr));
enginevgui = static_cast<IEngineVGui*>(appFactory(VENGINE_VGUI_VERSION, nullptr));
soundemitterbase = static_cast<ISoundEmitterSystemBase*>(appFactory(SOUNDEMITTERSYSTEM_INTERFACE_VERSION, nullptr));
render = static_cast<IVRenderView*>(appFactory(VENGINE_RENDERVIEW_INTERFACE_VERSION, nullptr));
CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory();
if (gameUIFactory)
gameui = static_cast<IGameUI*>(gameUIFactory(GAMEUI_INTERFACE_VERSION, nullptr));
if (!enginesound || !enginevgui || !engine || !soundemitterbase || !render || !gameui)
Error("CGameUI2::Initialize() failed to get necessary interfaces.\n");
if (!CommandLine()->FindParm("-shaderedit"))
{
GetBasePanel()->Create();
if (GetBasePanel())
gameui->SetMainMenuOverride(GetBasePanel()->GetMainMenu()->GetVPanel());
}
}
示例4: Activate
void CPointBonusMapsAccessor::Activate( void )
{
BaseClass::Activate();
CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory();
if ( gameUIFactory )
{
m_pGameUI = (IGameUI *) gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL );
}
}
示例5: BonusMapChallengeObjectives
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 );
}
}
}
示例6: BonusMapChallengeNames
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 );
}
}
}
示例7: CDllDemandLoader
T *GetInterface( const char *pchModuleName, const char *pszInterfaceVersion )
{
int nReturnCode = 0;
CDllDemandLoader module = CDllDemandLoader( pchModuleName );
T *pInterface = (T*)module.GetFactory()(pszInterfaceVersion, &nReturnCode);
module.Unload();
//if (nReturnCode == IFACE_FAILED)
// return NULL;
//else
// return pInterface;
return (nReturnCode == IFACE_FAILED) ? NULL : pInterface;
}
示例8: Init
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" );
}
}
}
示例9: LoadGameUI
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;
}
示例10: Init
//-----------------------------------------------------------------------------
// 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();
}