Talk:VGUI HTML Screen In Multiplayer

From Valve Developer Community
Revision as of 19:49, 27 December 2013 by Davecb 42 (talk | contribs) (Building in 2013)

Jump to: navigation, search


Hi, nice tut! But how does the link for an entity work? What must i do?

See the end of the singleplayer article --Daedalus 07:39, 11 Jun 2007 (PDT)

Status as of 27 December 2013

I'm using the new version of the SDK, downloaded from github, and notice that the directory structures have changed somewhat, and secondarily I'm getting some diagnostics. I'll add the directory structures first, and an update with what I understand from the diagnostics later.

Directory structure in 2013

vgui_int.cpp lives in source-sdk-2013/mp/src/game/client/vgui_int.cpp (using C++ #include notation). The parent project's IMyPanel.h and MyPanel.cpp live there too.

mypanel.res lives in source-sdk-2013/mp/game/mod_hl2mp/resource/UI/mypanel.res GameMenu.res lives in source-sdk-2013/mp/game/mod_hl2mp/resource/GameMenu.res

For Visual Studio 2010, we have the solution "games" at source-sdk-2013/mp/src/games.sln, whcih contains 6 projects, of which the interesting ones are "Client (HL2MP)" and "Server (HL2MP)". As shipped, all 6 build cleanly.

Building in 2013

VC 2013 is not yet supported, one builds the 2013 SDK with VC 2010 after "cloning" a set of files from

At the moment, detailed steps are TBD, as I'm getting diagnostics (;-))

  • The first set of diagnostics are of the form
    • Error 2error C1083: Cannot open include file: 'EntHTML.h': No such file or directory c:\mysteamsdk\source-sdk-2013\mp\src\game\client\ihtmlview.h 12
    • c:\mysteamsdk\source-sdk-2013\mp\src\game\client\htmlview.cpp(38): fatal error C1083: Cannot open include file: 'EntHTML.h': No such file or directory

A correction is to change the include to say

#include <vgui_controls/EntHTML.h>

in both IHTMLView.h and HTMLView.cpp

  • A second error was
1>  HTMLView.cpp
1>c:\mysteamsdk\source-sdk-2013\mp\src\game\client\htmlview.cpp(49): error C2664: 'ConVar::ConVar(const char *,const char *,int,const char *,FnChangeCallback_t)' : cannot convert parameter 5 from 'void (__cdecl *)(ConVar *,const char *)' to 'FnChangeCallback_t'
1>          None of the functions with this name in scope match the target type

Casting the final parameter to FnChangeCallback_t stops the diagnostic... The code now says

ConVar cl_htmltarget("cl_htmltarget", "", FCVAR_CLIENTDLL, 
    "Sets the HTML address to <state>.", (FnChangeCallback_t) onTargetUpdate);
  • Subsequently I receive a less clear error:
1>------ Build started: Project: Client (HL2MP), Configuration: Debug Win32 ------
1>Build started 12/27/2013 2:11:47 PM.
1>  Touching ".\Debug_mod_hl2mp\Client (HL2MP).unsuccessfulbuild".
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>  HTMLView.cpp
1>c:\mysteamsdk\source-sdk-2013\mp\src\game\client\htmlview.cpp(69): error C2259: 'vgui::EntHTML' : cannot instantiate abstract class
1>          due to following members:
1>          'bool vgui::IHTMLEvents::Obsolete_OnStartURL(const char *,const char *,bool)' : is abstract
1>          c:\mysteamsdk\source-sdk-2013\mp\src\public\vgui\ihtml.h(147) : see declaration of 'vgui::IHTMLEvents::Obsolete_OnStartURL'