VGUI HTML Screen In Orange Box
Jump to navigation
Jump to search
This tutorial is an add-on to the VGUI HTML Screen and VGUI HTML Screen In Multiplayer articles, providing details on implementing the VGUI HTML Screens in the Orange Box.
Please read either of the above articles in full, as this article simply provides replacements for a few areas.
Files
Several files need to be added to existing projects.
If you have completed either of the above articles, you will probably be replacing these files.
Everything_SDK - Building the HTML entity
1. Add the following files to the vgui_controls project:
-
- src\public\vgui_controls\EntHTML.h
- Note: If you have followed either of the original articles, this file merely needs to be moved.
-
- src\vgui2\vgui_controls\EntHTML.cpp
2. Right click the vgui_controls project, and select Build.
- Warning: Do not select Build Solution, as not all the projects build, and this would leave your mod in an uncompilable state.
Game Project
Open the Game_HL-200x project, and add the following files to the project:
Client (HL2 or HL2MP) Project
- src\game\client\htmlview.cpp
- src\game\client\ihtmlview.h
Server (HL2 or HL2MP) Project
- src\game\server\sv_htmlview_support.cpp
Finishing Up
One of the game files needs to be modified.
- In the Client (HL2 or HL2MP) project, find and open the vgui_int.cpp file.
- Near the top of the file, locate the line:
#include "FileSystem.h"
- Add a line below this:
#include "IHTMLView.h"
- Go to line 159
- Add the following lines:
VPANEL gameParent = enginevgui->GetPanel( PANEL_INGAMESCREENS ); htmlview->Create(gameParent);
- Go down to the next function, and find the line:
VGUI_DestroyClientDLLRootPanel();
- Add the following line:
htmlview->Destroy();
- Build your solution, and if everything goes fine, you should be able to use the HTML VGUI Screens in the Orange Box.
- Post any issues on the Discussion page, or email me.