nyuuzyou/wikis huggingface dataset:
VGUI Helpers

File: src\cl_dll\vgui_helpers.h
These functions will crash with a null pointer as pPanel.
;int PanelTop( vgui::Panel *pPanel ):Returns the orientation of the top of pPanel.
;int PanelLeft( vgui::Panel *pPanel ):Returns the orientation of the left of pPanel.
;int PanelRight( vgui::Panel *pPanel ):Returns the orientation of the right of pPanel.
;int PanelBottom( vgui::Panel *pPanel ):Returns the orientation of the bottom of pPanel.
;int PanelWidth( vgui::Panel *pPanel ):Returns the orientation of the width of pPanel.
;int PanelHeight( vgui::Panel *pPanel ):Returns the orientation of the height of pPanel.
H
Category:Helpers
VGUI IImage

An IImage is a vgui2 element defined in the vgui_controls library, in the file IImage.cpp. IImages are available in all source games. IImage is a pure virtual class, which means that it cannot be instantiated as an object and is used simply as a base class for other classes.
* The only class that derives from IImage is VGUI Image.
Looking for an image you can instantiate? See VGUI ImagePanel.
I
Category:Stubs
VGUI Image

An Image is a vgui2 element defined in the vgui_controls library, in the file Image.cpp. Images are available in all source games. Image is a pure virutal class, which means that it cannot be instantiated as an object and is used simply as a base class for other classes.
* The only class that derives from Image is VGUI TextImage.
* Image is derived from VGUI IImage.
Looking for an image you can instantiate? See VGUI ImagePanel.
I
VGUI ImagePanel

An ImagePanel is a vgui2 element defined in the vgui_controls library, in the file ImagePanel.cpp. ImagePanels are available in all source games. An ImagePanel is a simple panel that displays an image.
== Example Usage ==
Before creating anything, we first need to include the ImagePanel header file and use the vgui namespace.
 #include <vgui_controls/ImagePanel.h>
 using namespace vgui;
ImagePanels can be created via the c++ keyword new with a simple call to ImagePanel:
 ImagePanel* imagePanel = new ImagePanel(this, "myPanel");
Once we have our ImagePanel created, we can now tell it which image to display:
 imagePanel->SetImage(scheme()->GetImage("myimage", false));
 
Its important to note that scheme::GetImage begins from "materials/vgui" and no extensions should be provided. So, scheme()->GetImage("vgui/eye", false) would really point to "materials/vgui/vgui/eye.vmt".
And we're done!
I
VGUI Label

VGUI Label is a VGUI control found in the vgui_controls library. Labels are useful for displaying small amounts of text. For displaying blocks or paragraphs of text, see VGUI RichText.
== Object description ==
An object which displays text. It can additionally be used (in conjunction with a hotkey and the associate property set) to set the focus to the object named as the associated.
Often used before VGUI TextEntry entries to tell the user what function the TextEntry has.
== Availability ==
This object is available in all Source games.
In code it is represented by class Label (derived from class Panel), defined in public/vgui_controls/Label.h and contained in the namespace vgui.
The source file is located at: vgui2/controls/Label.cpp
Inherits from Panel.
Text uses the control VGUI TextImage to render.
== Keyvalues ==
*Font
:<string> The font to render the text with.
:Default: "Default"
:If given font is invalid, reverts to default.
*labelText
:<string> The text to display.
:Default: NULL ("", empty string)
:Notes:
May be a localized string if starts with #
Ex. "labelText" "#Title"
If it contains an & the next character and the next only will be considered as a hotkey. If the next character is not usable it will
continue parsing starting on the key AFTER the next. So, if it contains two consecutive &, it will fail, both will be disregarded
and a third & would be the one that starts a new key lookup. The hotkey has to be alphanumeric.
 Ex.
 "labelText" "&a", a is hotkey
 "labelText" "&.a", no hotkey
 "labelText" "&.&a", a is hotkey
 "labelText" "&a&b", a is hotkey
 "labelText" "&&a", no hotkey
 "labelText" "&&&a&&b&c", a is hotkey
If the text is regular text it will lookup using isalnum(), if it is localized (started with #) it will use iswalnum().
Hotkeys are automatically lower-cased. They fire OnHotkeyPressed().
May be a localized variable if between '%'s
Ex. "labelText" "%localize_me%"
Will do:
 localize()->AddString( "var_%localize_me%", L"%localize_me%", "" );
 Label->SetText( "#var_%localize_me%" );
*textAlignment
:<string> How the text within the label is aligned.
:Default: "", -1, (unkown)
:Valid range:
::*"north-west"
::*"north"
::*"north-east"
::*"west"
::*"center"
::*"east"
::*"south-west"
::*"south"
::*"south-east"
*associate
:<string> The control this label is associated with. Will transfer control to this control when hotkey sequence is pressed.
:Default: ""
*dulltext
:<integer>
:Default: 0
:Valid range: 0, 1
:If 1 sets colorstate CS_DULLTEXT
:
*brighttext
:<integer>
:Default: 0
:Valid range: 0, 1
:If 1 sets colorstate CS_BRIGHTTEXT
:
:
*wrap
:<integer> Specifies whether or not to wrap the text to the next line if too long.
:Default: 0
:Valid range: 0, 1
L
VGUI ListPanel

A ListPanel is a vgui2 element defined in the vgui_controls library, in the file ListPanel.cpp. ListPanels are available in all source games. ListPanels are used for listing information in a tabular format.
== Example Usage ==
Before creating anything, we first need to include the ListPanel header file and use the vgui namespace.
 #include <vgui_controls/ListPanel.h>
 using namespace vgui;
ListPanels can be created via the c++ keyword new with a simple call to ListPanel.
 ListPanel* myPanel = new ListPanel(this, "myPanel");
== Additional Information ==
Additional information and examples can be found by looking at the MP3 code, found in mp3player.cpp in the game_controls folder.
L
Category:Stubs
VGUI ModelPanel

The ModelPanel allows the drawing of various 3D models on a VGUI Panel.
It will play Activities/Sequences on the set model.
You can also set which skin to use on this model (Index value, zero based).
This VGUI class is found in basemodelpanel.cpp
== Example ==
The following is used in a resource script, and placed inside of a VGUI Panel.
 "CModelPanel"
 {
 
 //Basic Panel settings
 "ControlName"		 "CModelPanel"
 "fieldName"		 "CModelPanel1"
 "xpos"		 "61"
 "ypos"		 "12"
 "wide"		 "150"
 "tall"		 "200"
 "autoResize"		 "0"
 "pinCorner"		 "0"
 "visible"		 "1"
 "enabled"		 "1"
 "tabPosition"		 "0"
 
 //Model
 //
 //This contains information about the model in the panel
 "model"
 {
 //The dir/name of the model (.MDL)
 "modelname" "models/Weapons/w_smg1.mdl"
 
 //The dir/name of a 'HWMorph Model'
 "modelname_hwm" ""
 
 //Skin number
 "skin" "0"
 
 //Rotation in X
 "angles_x" "0.0"
 
 //Rotation in Y
 "angles_y" "0.0"
 
 //Rotation in Z
 "angles_z" "0.0"
 
 //Position in X
 "origin_x" "0.0"
 
 //Position in Y
 "origin_y" "0.0"
 
 //Position in Z
 "origin_z" "0.0"
 
 //Camera position in X
 "frame_origin_x" "5.0"
 
 //Camera position in Y
 "frame_origin_y" "0.0"
 
 //Camera position in Z
 "frame_origin_z" "0.0"
 
 //Choreography Scene File dir/name
 "vcd" ""
 
 //Use spotlight? (lights up the model)
 "spotlight" "1" 
 }
 
 //Animation
 //
 //This contains Activity/Sequence information for the model above
 //I believe there can be multiples of these
 "animation"
 {
 //Name of animation group
 "name" ""
 //Sequence name for the model to play
 "sequence" ""
 //Activity name for the model to play
 "activity" ""
 //Should this model use this animation by default?
 "default" "0"
 }
 
I know nothing about working with Wiki pages, but i feel this information should be on here. If someone could pretty this page up, that would be awesome. I would keep the example for reference though.
--RvIceBreaker 04:07, 15 December 2010 (UTC)
P
VGUI PanelList

This is a simple panel list that I made for use on Perfect Dark SP Source. It lists a bunch of panels and has the ability to group them as well. This is not final code but it should work (might be a couple of bugs).
==The Result==
From the picture you can see the header, and the sub panels with the ability to scroll and select. This image is from PerfectDark Source SP.
==The Code==
* PanelList_cpp
* PanelList_h
* PanelList_SubPanel (an example)
Save these files and add them to your client project.
==How to use them==
To use this you will need to make a new panel (covered in other tutorials on this site). Also you will need a subpanel and you can use the existing subpanel or make a new sub panel of your own following the guild lines below.
===Header===
Add this to the top of the header file
 	//make sure you change this to reflect your file name!
 	#include "pd_panel_list.h"
Add this to your class:
 private:
 	PD_PanelList *m_pPanelList;
===Constructor===
 	//makes new object
 	m_pPanelList = new PD_PanelList(this, "Map_PL");
 
 	//sets the x, y pos and the w, h
 	m_pPanelList->SetBounds(15,40,350,255);
 
 	//Very Important. Means it will relay messages to this panel
 	m_pPanelList->AddActionSignalTarget( this );
 
 	//usefull if you want key commands to go up/down
 	m_pPanelList->SetKeyBoardInputEnabled( true );
===The sub panel===
Sub-panels must inherit from PD_BasePanel (found in PanelList_h). Things to note:
*Parent class must be PD_BasePanel as this sets up mouse events
*Must have a resize method (other wise it will never look right) which resizes the elements
*Can have any panel elements on it
*Need to set mouse imput enabled to false on all child elements. Other wise this will over ride the panellist mouse events
===Adding panels===
Addding panels is as easy as making a new panel then adding it to the panellist.
 	//make sure you pass the panel list as parent because it will control the panel!
 	SubPanel *temp= new SubPanel(m_pPanelList, name);
 
 	//Set the sub panel up
 	temp->SetTitle("Panel Title");
 	temp->SetText("Some Text");
 
 	//this is to fix a bug that i havnt fixed yet. If adding a duplicate panel it doesnt delete temp
 	//but doesnt add it to the list ether
 	if (m_pPanelList->AddPanel(temp)==-1)
 	{
 		delete temp;
 	}
Category:Custom VGUI Controls
Category:Free source code
VGUI PanelListPanel

A PanelListPanel is a vgui2 element defined in the vgui_controls library, in the file PanelListPanel.cpp. PanelListPanels are available in all source games. PanelListPanels display a list of user-specified label, control pairs.
== Example Usage ==
Before creating anything, we first need to include our header files and use the vgui namespace.
#include <vgui_controls/Label.h>
#include <vgui_controls/ImagePanel.h>
#include <vgui_controls/PanelListPanel.h>
using namespace vgui;
These next two blocks of code generally should be added to the constructor.
PanelListPanels can be created via the c++ keyword new with a simple call to PanelListPanel:
PanelListPanel* myPanel = new PanelListPanel(this, "myPanel");
Once we have our PanelListPanel created, we can now add controls to it:
char buffer [40];
 
for (int i = 0; i < 5; i++)
{
	// Create Image
	Q_snprintf(buffer, sizeof(buffer), "image%i", i);
	ImagePanel* imagePanel = new ImagePanel( this, buffer );
 	imagePanel->SetImage(scheme()->GetImage("", false));
 
 // Create Label
 	Q_snprintf(buffer, sizeof(buffer), "label%i", i);
 	Label* label = new Label( this, buffer, buffer );
 	label->SetText(buffer);
 
 // Add Label and Image to PanelListPanel
 	m_pList->AddItem(label, imagePanel);
}
With m_pList being a pointer to the PanelListPanel.
Its also important to note that scheme::GetImage's first argument begins from "materials/vgui" and no extensions should be provided. So, scheme()->GetImage("vgui/eye", false) would really point to "materials/vgui/vgui/eye.vmt".
Lastly we'll set the control size and make it visible.
void CExample::PerformLayout()
{
	BaseClass::PerformLayout();
	m_pList->SetBounds( 280, 300, 200, 200 ); //posX, posY, width, height
	m_pList->SetVisible( true );
}
And we're done!
== Interesting Notes ==
* While the latest episodic code does not support multiple columns, the orangebox code might (needs verification).
* Adding labels to to the list is optional. If you do not want to add a label to the control, you can call AddItem with a NULL label.
 m_pList->AddItem(NULL, imagePanel);
* The size of the leftmost labels column can be adjusted by calling SetFirstColumnWidth(int)
* You can download my Custom VGUI Control, VGUI ControlGrid, to add support for multiple columns (if you don't already have it) and to fix the bug mentioned below.
== Known Problems With PanelListPanel ==
* On multi-columned PanelListPanels, the labels are stacked ontop of eachother.
P
VGUI RichText

RichText is a vgui2 element defined in the vgui_controls library, in the file RichText.cpp. RichText is available in all Source games. RichText is useful for displaying blocks or paragraphs of text, as opposed to VGUI Label, which is used to display small amounts of text.
The difference between RichText and Label lies in the functionality of RichText. RichText is more useful for displaying blocks of text because it has scrollbars, borders, text formatting, and text wrapping. Note that the scrollbars and borders can also be disabled if necessary.
== Example Usage ==
Before creating anything, we first need to include the RichText header file and use the vgui namespace.
 #include <vgui_controls/RichText.h>
 using namespace vgui;
RichText can be created via the c++ keyword new with a simple call to RichText:
 RichText* txt = new RichText(this, "myText");
Once we have our RichText created, we now need to configure it (usually done in ApplySchemeSettings):
 void CItemMenu::ApplySchemeSettings( vgui::IScheme *pScheme )
 {
 	BaseClass::ApplySchemeSettings( pScheme );
 
 txt->SetText("This is an example of rich text. Rich text is useful for droning on and on about a subject...");
 txt->SetFont(pScheme->GetFont( "DefaultVerySmall" ));
 txt->SetPos(200,200);
 txt->SetSize(200,200);
 txt->SetVisible(true);
 }
And we're done!
== Known Problems with RichText ==
Sometimes the text will extend past the bottom of the RichText border. You can see an example of this in the screenshot. You can sometimes work around this by changing the control's height.
R
VGUI SectionedListPanel

A SectionedListPanel is a VGUI2 element defined in the vgui_controls library, in the file SectionedListPanel.cpp. SectionedListPanels are available in all source games.
SectionListPanels are useful for creating sectioned groups of information, as a list. These list items are then sortable by the values contained in them, such as a player's name or their score. The standard scoreboard was created using a SectionedListPanel (visible inside of CClientScoreBoardDialog : SectionedListPanel), and thus represents a good example of its capabilities. 
== Overview ==
The member m_Items is a CUtlLinkedList class that contains unsorted items, and calling SectionedListPanel::ResortList() traverses through m_Items and sorts m_Items provided you define a sorting function m_pFuncSort passed via AddSection(). The resulting sorted list is then stored in the vector m_SortedItems.
== Example Usage ==
Before creating anything, we first need to include the SectionedListPanel header file and use the vgui namespace.
#include <vgui_controls/SectionedListPanel.h>
using namespace vgui;
SectionedListPanels can be created via the C++ keyword new with a simple call to SectionedListPanel.
SectionedListPanel* myPanel = new SectionedListPanel(this, "myPanel");
Remember that you need to provide your own sorting function!
== Example Sorting Function ==
This is taken from CClientScoreBoardDialog, note that the sort function returns true if itemID1 > itemID2. Hence the term static sort. 
bool CClientScoreBoardDialog::StaticPlayerSortFunc(vgui::SectionedListPanel *list, int itemID1, int itemID2)
{
	KeyValues *it1 = list->GetItemData(itemID1);
	KeyValues *it2 = list->GetItemData(itemID2);
	Assert(it1 && it2);
	// first compare frags
	int v1 = it1->GetInt("frags");
	int v2 = it2->GetInt("frags");
	if (v1 > v2)
		return true;
	else if (v1 < v2)
		return false;
	// next compare deaths
	v1 = it1->GetInt("deaths");
	v2 = it2->GetInt("deaths");
	if (v1 > v2)
		return false;
	else if (v1 < v2)
		return true;
	// the same, so compare itemID's (as a sentinel value to get deterministic sorts)
	return itemID1 < itemID2;
}
== Additional Information ==
Additional information and examples can be found by simply looking at the scoreboard code, found in ClientScoreBoardDialog.cpp in the game_controls folder.
Category:VGUI_Controls
Category:Stubs
VGUI TextImage

A TextImage is a vgui2 element defined in the vgui_controls library, in the file TextImage.cpp. TextImages are available in all source games. TextImage is not really a full functioning control, it's used by VGUI Label to draw text.
You can, however, use TextImage to draw text, but you will need to call TextImage's paint function, as it is not automatically called.
== Example Usage ==
Before creating anything, we first need to include the TextImage header file and use the vgui namespace.
 #include <vgui_controls/TextImage.h>
 using namespace vgui;
First, lets add a new variable to our class's header file:
TextImage* text;
TextImages can be created via the c++ keyword new with a simple call to TextImage:
 text = new TextImage("Text");
Once we've created our TextImage, we now need to do some configuration, usually done in ApplySchemeSettings:
 void CExample::ApplySchemeSettings( vgui::IScheme *pScheme )
 {
 BaseClass::ApplySchemeSettings( pScheme );
 
 text->SetText("Text");
 text->SetPos(200,200);
 text->SetSize(100,50);
 text->SetFont(pScheme->GetFont( "DefaultVerySmall" ));
 text->SetColor( Color( 200, 255, 200, 255 ) );
 }
As mentioned above, TextImages will not automatically paint themselves, so, we need to paint them. Don't worry, its fairly simple.
 void CExample::Paint()
 {
 BaseClass::Paint();
 
 text->Paint();
 }
Heres what it should look like when you're done:
T
Category:Stubs
VGUI Tooltip

A tooltip is a vgui2 element defined in the vgui_controls library, in the file Tooltip.cpp. Tooltips are available in all games. Tooltips are useful for displaying additional information about something, without taking up any extra space.
== Example Usage ==
* Before using tooltips, be sure to include vgui_controls/tooltip.h.
* Most VGUI elements have tooltips associated with them.
* You can call control->GetTooltip() to get the control's tooltip, and then you can call tooltip->SetText to set the tooltip's text.
* Alternatively, you can also set the text of a tooltip in a resource file using the keyvalue tooltiptext.
 "StrengthLabel"
 {
 "ControlName"	"Label"
 "fieldName"		"StrengthLabel"
 "xpos"		"185"
 "ypos"		"2"
 "tooltiptext"	"Each point increases hit points by 19. Each point increases hit point regen."
 "wide"		"100"
 "tall"		"20"
 "autoResize"	"0"
 "pinCorner"		"0"
 "visible"		"1"
 "enabled"		"1"
 "tabPosition"	"0"
 "labelText"		"Strength:"
 "textAlignment"	"west"
 "dulltext"		"0"
 "brighttext"	"0"
 "wrap"		"0"
 }
== Known Problems With Tooltips ==
Calling Tooltip::SetText on a tooltip when a tooltip window is visible changes the text for the visible tooltip window. Make sure that you check to make sure no tooltip windows are currently open before calling Tooltip::SetText.
 void Tooltip::SetText(const char *text)
 {
 	_isDirty = true;
 
 	if (!text)
 	{
 		text = "";
 	}
 
 	if (m_Text.Size() > 0)
 	{
 		m_Text.RemoveAll();
 	}
 
 	for (unsigned int i = 0; i < strlen(text); i++)
 	{
 		m_Text.AddToTail(text[i]);
 	}
 	m_Text.AddToTail('\0');
 	
 	if (s_TooltipWindow.Get())
 	{
 		s_TooltipWindow->SetText(m_Text.Base());
 	}
 }
The code above was taken from line 89 of tooltip.cpp.
 uses a static handler for the current displayed tooltip window (declared on line 28 of tooltip.cpp), static vgui::DHANDLE< TextEntry > s_TooltipWindow;.
Ii isn't clear why, but as you can see in the code above, towards the end of the function Tooltip::SetText, it changes the text of the active tooltip window. Valve needs to remove this from their code to fix this bug.
T
VHLT

Vluzacn's Half-Life Tools (also: Vluzacn's Map Compile tools or Vluzacn's ZHLT) is a set of map compile tools for GoldSource engine. It is a continuation of the final version of Zoner's compile tools released in 2006. Numerous bugs have been fixed, as well as many new features added to further extend the capability of the Half-Life engine.
The final update is v34, released on August 17, 2015.
== External links ==
* VHLT Development Thread + Downloads – archive on Wayback Machine
* Vluzacn's Half-Life Tools (VHLT) | GameBanana – download @ GameBanana
Category:Glossary
Category:Half-Life Level Design
Category:Third Party Tools
Category:GoldSrc Glossary
VHV

VHV files (Valve Hardware Verts) stores pre-baked vertex colors used for "per-vertex" static prop lighting, in a format designed to be very cheap to upload to the GPU.
Description from :
Due to their purpose-formatted nature, they are not particularly reusable. Third party VRAD compilers should be used if desiring to use custom vertex colors in a way that wouldn't normally be generated by VRAD's static prop lighting calculations.
== See also ==
* PPL, the equivalent for lightmapped props
Category:File formats
VICE

Vice is Valve's tool for ICE encryption, a trick used mainly to protect weapon script files from modification by server admins. Only its source code is included in the SDK. The compiled executable must be placed in the SDK's bin\<engine>\bin\ folder to run.
== Usage ==
vice [-quiet] [-nopause] [-encrypt key] [-decrypt key] [-newext name] file ...
;-quiet
:Don't print anything out, don't pause for input.
;-nopause
:Don't pause for input.
;-encrypt
:Encrypt files with given key.
;-decrypt
:Decrypt files with given key.
;-newext
:New output file extension.
==Troubleshooting==
Most users who try Steam will get a problematic SteamAppId error. This is due to Steam filesystem update inconsistency. It stripped one word from the gameinfo.txt and didn't notify anyone. In order to use these Steam applications you must go to the root folder of your mod or the game you want to modify, and change ToolsAppID to AppID. This will allow you to use both versions of vice and a few more programs like mdldecompiler. You must also make sure that your mod or game is selected in vconfig. If you edit your mod's gameinfo file and have Half-Life 2 selected in vconfig you will not be doing much.
If you are decrypting Valve games and not your own mods, then you will have to make this change each time you want to use vice or any other applications that give the same message. For each time you run say, Day of Defeat: Source, it creates a new GameInfo.txt file that still include Tools.
== Alternatives ==
* Standalone Vice (doesn't require Steam)
* Red comet's Standalone Vice with wildcard support (Vice2)
* RavuAlHemio's Standalone Vice with improved wildcard support (Vice3)
==See also==
* CTX
* CtxConverter
* ICE
* Using Vice without Steam
* Weapon script
== External links ==
* (mediafire)L4D2 VScript Editor Beta 0.5 by Cynick:support nut (de)compile for l4d2
VIDE

Category:Third Party Tools
, or the , is a third-party tool used by Source developers and mappers. Its primary feature is the embedding of custom content into a map file and features a mass VTF/VMT editor.
== Features ==
* Hammer Splitter Editor
* Package Viewer (equivalent to )
* Particle Editor
* VBSP Editor
* VMT Editor
* Mass VMT Editor
* VTF Editor (equivalent to )
* Mass VTF Editor
* BSP Info
* Entity Lump Editor (equivalent to Entspy)
* Pakfile Lump Editor (equivalent to Pakrat)
==Tutorial==
There is a tutorial by TopHATTWaffle on his website, here.
== Download ==
* GameBanana
* TopHATTwaffle's website (unstable)
* TheRaZZeRApp's website 
* Official website
== Bugs ==
== See also ==
*Third Party Tools
*Pakrat - An alternative program to the VIDE, albeit deprecated.
*Compiling
*Entspy