Difference between revisions of "Talk:VGUI HTML Screen In Multiplayer"

From Valve Developer Community
Jump to: navigation, search
m (Building in 2013)
m (Directory structure in 2013)
Line 13: Line 13:
 
=== Directory structure in 2013 ===
 
=== 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.
+
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. On linux, the makefile, client_linux32_hl2mp.mak, is here as well.
 +
 
 +
The XXX files live in source-sdk-2013/mp/src/vgui2/vgui_controls, along with the vgui_controls_linux32.mak makefile.
 +
 
  
 
mypanel.res lives in source-sdk-2013/mp/game/mod_hl2mp/resource/UI/mypanel.res   
 
mypanel.res lives in source-sdk-2013/mp/game/mod_hl2mp/resource/UI/mypanel.res   
Line 19: Line 22:
  
 
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.
 
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.
 +
 +
For Linux, we have the two .mak files, each of which need the new files added to the "CPPFILES" list.  It's convenient to move vgui_int.cpp and any new files to the beginning of the list, which looks like
 +
 +
<nowiki>CPPFILES= \
 +
    vgui_int.cpp \
 +
    VgPanel.cpp \
 +
    ../../common/compiledcaptionswap.cpp \
 +
    ../../common/language.cpp \
 +
    </nowiki>
  
 
=== Building in 2013 ===
 
=== Building in 2013 ===

Revision as of 19:07, 29 December 2013

Link

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. On linux, the makefile, client_linux32_hl2mp.mak, is here as well.

The XXX files live in source-sdk-2013/mp/src/vgui2/vgui_controls, along with the vgui_controls_linux32.mak makefile.


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.

For Linux, we have the two .mak files, each of which need the new files added to the "CPPFILES" list. It's convenient to move vgui_int.cpp and any new files to the beginning of the list, which looks like

CPPFILES= \
    vgui_int.cpp \
    VgPanel.cpp \
    ../../common/compiledcaptionswap.cpp \
    ../../common/language.cpp \
    

Building in 2013

VC 2013 is not yet supported, one builds the 2013 SDK with VC 2010 after "cloning" a set of files from https://github.com/ValveSoftware/source-sdk-2013

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>InitializeBuildStatus:
1>  Touching ".\Debug_mod_hl2mp\Client (HL2MP).unsuccessfulbuild".
1>CustomBuild:
1>  All outputs are up-to-date.
1>ClCompile:
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'
   ...