VGUI HTML Screen In Orange Box: Difference between revisions
Jump to navigation
Jump to search
(Orange Box edition of VGUI HTML Screen) |
Thunder4ik (talk | contribs) m (→Server (HL2 or HL2MP) Project: clean up) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
Please read either of the above articles in full, as this article simply provides replacements for a few areas. | Please read either of the above articles in full, as this article simply provides replacements for a few areas. | ||
<div class="boilerplate metadata" id="cleanup" style="text-align: center; background: #efefff; margin: .5em 10%; padding: .3em 1em; border: #9F9FFF 1px solid;"> | |||
'''NOTICE!'''<br/> | |||
A problem has been reported, where setting cl_htmltarget <code>:www.google.com</code> would cut off part of the URL.<br/> | |||
To fix this, simply comment line 140: | |||
<source lang="cpp"> | |||
139: n_target++; if(!*n_target) { return ; } // Buffer check | |||
140: n_target++; | |||
</source> | |||
Becomes: | |||
<source lang="cpp"> | |||
139: n_target++; if(!*n_target) { return ; } // Buffer check | |||
140: //n_target++; | |||
</source> | |||
The source code has been updated to reflect these changes. | |||
</div> | |||
= Files = | = Files = | ||
Line 35: | Line 51: | ||
=== Server (HL2 or HL2MP) Project === | === Server (HL2 or HL2MP) Project === | ||
* [[VGUI HTML Screen In Orange Box/ | * [[VGUI HTML Screen In Orange Box/sv htmlview support.cpp|sv_htmlview_support.cpp]] | ||
: src\game\server\sv_htmlview_support.cpp | : src\game\server\sv_htmlview_support.cpp | ||
Line 54: | Line 70: | ||
* Build your solution, and if everything goes fine, you should be able to use the HTML VGUI Screens in the Orange Box. | * 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 [[User:Daedalus|email me]]. | * Post any issues on the Discussion page, or [[User:Daedalus|email me]]. | ||
[[Category:Programming]][[Category:Tutorials]][[Category:VGUI|H]] |
Latest revision as of 05:50, 5 January 2024
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.