IVGuiModuleLoader: Difference between revisions
Jump to navigation
Jump to search
m (→Access) |
|||
| Line 43: | Line 43: | ||
CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll"); | CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll"); | ||
moduleloader = (IVGuiModuleLoader *)gameUIFactory(VGUIMODULELOADER_INTERFACE_VERSION,NULL); | moduleloader = (IVGuiModuleLoader *)gameUIFactory(VGUIMODULELOADER_INTERFACE_VERSION, NULL); | ||
[[Category:Interfaces]] | [[Category:Interfaces]] | ||
Revision as of 18:47, 6 January 2006
With this interface not included in the SDK, you can activate the server browser module and the friends module.
public\gameui\IVGuiModuleLoader.h
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef IVGUIMODULELOADER_H
#define IVGUIMODULELOADER_H
#ifdef _WIN32
#pragma once
#endif
#include "interface.h"
#define APP_FRIENDS 0
#define APP_SERVERS 1
//-----------------------------------------------------------------------------
// Purpose: interface to accessing all loaded modules
//-----------------------------------------------------------------------------
class IVGuiModuleLoader : public IBaseInterface
{
public:
virtual int GetModuleCount() = 0;
virtual const char * GetModuleLabel(int moduleIndex) = 0;
virtual CreateInterfaceFn GetModuleFactory(int moduleIndex) = 0;
virtual bool ActivateModule(int moduleIndex) = 0;
virtual bool ActivateModule(const char *moduleName) = 0;
virtual void SetPlatformToRestart() = 0;
};
#define VGUIMODULELOADER_INTERFACE_VERSION "VGuiModuleLoader003"
#endif // IVGUIMODULELOADER_H
Access
#include <gameui\IVGuiModuleLoader.h> IVGuiModuleLoader * moduleloader = NULL;
CreateInterfaceFn gameUIFactory = Sys_GetFactory("gameui.dll");
moduleloader = (IVGuiModuleLoader *)gameUIFactory(VGUIMODULELOADER_INTERFACE_VERSION, NULL);