IVGuiModuleLoader: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 25: | Line 25: | ||
{ | { | ||
public: | public: | ||
virtual int GetModuleCount() = 0; | virtual int GetModuleCount() = 0; | ||
virtual const char *GetModuleLabel(int moduleIndex) = 0; | virtual const char * GetModuleLabel(int moduleIndex) = 0; | ||
virtual CreateInterfaceFn GetModuleFactory(int moduleIndex) = 0; | virtual CreateInterfaceFn GetModuleFactory(int moduleIndex) = 0; | ||
virtual bool ActivateModule(int moduleIndex) = 0; | virtual bool ActivateModule(int moduleIndex) = 0; | ||
virtual bool ActivateModule(const char *moduleName) = 0; | virtual bool ActivateModule(const char *moduleName) = 0; | ||
virtual void SetPlatformToRestart() = 0; | virtual void SetPlatformToRestart() = 0; | ||
}; | }; | ||
Line 37: | Line 37: | ||
#endif // IVGUIMODULELOADER_H</pre> | #endif // IVGUIMODULELOADER_H</pre> | ||
==Access== | ==Access== | ||
#include <gameui\IVGuiModuleLoader.h> | #include <gameui\IVGuiModuleLoader.h> |
Revision as of 19:44, 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);