This article's documentation is for anything that uses the Source engine. Click here for more information.

Category:VGUI: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(45 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}
| es = :Category:VGUI:es
'''VGUI''' (technically have two versions, "'''VGUI'''" and "'''VGUI2'''"), is used to display dynamic 2D images and graphical user interfaces in {{goldsrc|1}} (since 2002) and {{source|1}}, as well as {{source2|1}} (in some games). This includes dialogues and buttons, the [[HUD]], in-game menu, and even the surfaces of monitors and screens in the 3D world. It is platform-independent and [[Wikipedia:Unicode|Unicode]]-compliant.
| ru = :Category:VGUI:ru}}
'''VGUI''' (or, technically, "'''VGUI2'''"), is used to display dynamic 2D images in Source. This includes dialogues and buttons, the [[HUD]], and even the surfaces of monitors and screens in the 3D world. It is platform-independent and [[Wikipedia:Unicode|Unicode]]-compliant.


VGUI2 forms can technically be displayed on the Windows desktop (e.g. Steam) as well as in-game, but mod authors don't have access to that functionality.
VGUI2 forms can technically be displayed on the Windows, Mac and Linux desktop as well as in-game.
<div style="float:right">[[File:HL1_VGUI_menu.png|340px|thumb|The {{hl|4}} main menu, rendered using VGUI2.]]
[[File:Ep2_menu.jpg|340px|thumb|The {{hl2ep2|4}} main menu, rendered using newer iteration of VGUI2.]]
</div>
== VGUI in Steam ==
{{steamicon|4}} at launch uses VGUI2, with the iconic green skin which was also used in GoldSrc games. Over time, the Steam client was redesigned in 2005 (replacing the GoldSrc styled VGUI2), 2007, 2010 (black skeuomorphism) and finally 2015 (with flat gradient blue design). In 2019, the Steam library along with [[Steam/Steam Chat|Steam Chat (Friends)]] was redesigned using CEF instead of VGUI, and Valve slowly removing more elements of VGUI until June 15, 2023, when the whole Steam UI was completely replaced with [[Chromium Embedded Framework]]. However, Steam will fallback to VGUI only if Steam detects that CEF wasn't working properly, telling users to restart all or some Steam process (e.g. {{path|steamwebhelper|exe}}), or when Steam is running in Windows compatibility mode.
 
This change also meant that custom [[Steam Skins|Steam skins]] (which uses VGUI) are no longer supported, and cannot be used except on [[:File:SteamJune2023-VGUI-Leftovers.png|few dialogs]], as long it's was selected prior to the update (or through Steam registry path ({{path|HKEY_CURRENT_USER\SOFTWARE\Valve\Steam\Skin|icon=reg}}), which can be viewed with Windows's Registry Editor).
 
== VGUI in GoldSrc ==
 
{{GoldSrc|4.1}} uses both VGUI and VGUI2, the former was introduced in 2000 with Half-Life 1.1.0.0 update, used for Scoreboard (replacing Opposing Force-style scoreboard), buy menu and MOTD (both in Counter-Strike), and latter (VGUI2) introduced with Half-Life 1.1.0.9 update alongside with the release of Steam Beta (and Steam Tracker) in 2002. GoldSrc's VGUI2 was later updated again in 2003 (with the release of Steam) and now being used to render the game main menu (replacing old menu which was restricted to 640x480). Early GoldSrc games on Steam (around 2003 until Steam update in 2005/2006), can have it's VGUI skins changed when you select a different skins on Steam client, as early GoldSrc games use {{code|TrackerScheme.res}} file located on {{path|Steam\platform\resource}} or {{path|Steam\skins\skin-name\platform\resource}} folder, instead of {{path|platform}} folder on the game files.
 
VGUI2 in GoldSrc uses the Steam green skin, which was also used in Steam client when it was initially launched in 2003.
 
Since {{hl|1}} 25th Anniversary Update (released in November 2023), VGUI & VGUI2 on all GoldSrc games (that are based on top of Half-Life) now scales on higher resolutions (1440p, 4K/3840x2160 or higher).
 
== VGUI in Source and Source 2 ==
[[File:Vgui_ui_scale_animated.gif|right|thumb|300px|Comparison between VGUI UI scale "1" (small) and "2" (big). Screenshot from {{css|1}} on {{tf2branch|1}}.</br>(Click to view if GIF does not play automatically).]]
{{Src|4}} and some {{Src2|4}} games{{confirm}} (the latter is only used for console UI in {{hla|1}} when launched with {{code|-console}}, and Half-Life 2 fallback HUD when Half-Life: Alyx is launched without VR) only uses VGUI2. Due to this wiki historically documenting Source more than GoldSrc, VGUI2 is oftentimes interchangeably referred to as VGUI.
 
Unlike GoldSrc VGUI, VGUI in Source cannot be snapped to the another window or the corner of the screen, but it does have fade in/out animations.
 
When {{Steamdeck|1}} was launched, Valve updated {{hl2|1}} and {{portal|1}} in 2022 to add a VGUI-based [[Gamepad UI]], which was optimized for handheld consoles and game controllers. It also scales properly at higher resolution, however, Gamepad UI was designed for 16:10 aspect ratio, which the Steam Deck uses, and while it was usable on 16:9 aspect ratio, it was not centered properly, and on 5:4 and 4:3 aspect ratio, [https://github.com/ValveSoftware/Source-1-Games/issues/5584 causes the right-side of the UI to get clipped].
 
As of 2025, with the release of Half-Life 2 and {{hl2dm|1}} 20th Anniversary Update (in Nov 2024) and in games such as {{Tf2|1}} (since April 2024), and February 18, 2025 update for {{css|1}}, {{dods|1}}, {{hldms|1}} and {{hl2dm|1}} (upgrading these games to {{tf2branch|1}}), and Portal in May 2025, VGUI now scales on higher resolutions (1440p, 4K/3840x2160 or higher).
{{clr}}
 
== About category ==
This page contains articles and documentations related to VGUI and VGUI2.


[[Category:Programming]]
[[Category:Programming]]
{{source topicon}}

Latest revision as of 03:32, 5 August 2025

English (en)Deutsch (de)Español (es)Polski (pl)Русский (ru)Українська (uk)中文 (zh)Translate (Translate)

VGUI (technically have two versions, "VGUI" and "VGUI2"), is used to display dynamic 2D images and graphical user interfaces in GoldSrc (since 2002) and Source, as well as Source 2 (in some games). This includes dialogues and buttons, the HUD, in-game menu, and even the surfaces of monitors and screens in the 3D world. It is platform-independent and Unicode-compliant.

VGUI2 forms can technically be displayed on the Windows, Mac and Linux desktop as well as in-game.

The Half-Life Half-Life main menu, rendered using VGUI2.
The Half-Life 2: Episode Two Half-Life 2: Episode Two main menu, rendered using newer iteration of VGUI2.

VGUI in Steam

Steam Steam at launch uses VGUI2, with the iconic green skin which was also used in GoldSrc games. Over time, the Steam client was redesigned in 2005 (replacing the GoldSrc styled VGUI2), 2007, 2010 (black skeuomorphism) and finally 2015 (with flat gradient blue design). In 2019, the Steam library along with Steam Chat (Friends) was redesigned using CEF instead of VGUI, and Valve slowly removing more elements of VGUI until June 15, 2023, when the whole Steam UI was completely replaced with Chromium Embedded Framework. However, Steam will fallback to VGUI only if Steam detects that CEF wasn't working properly, telling users to restart all or some Steam process (e.g. 🖿steamwebhelper.exe), or when Steam is running in Windows compatibility mode.

This change also meant that custom Steam skins (which uses VGUI) are no longer supported, and cannot be used except on few dialogs, as long it's was selected prior to the update (or through Steam registry path (Registry PathHKEY_CURRENT_USER\SOFTWARE\Valve\Steam\Skin), which can be viewed with Windows's Registry Editor).

VGUI in GoldSrc

GoldSrc GoldSrc uses both VGUI and VGUI2, the former was introduced in 2000 with Half-Life 1.1.0.0 update, used for Scoreboard (replacing Opposing Force-style scoreboard), buy menu and MOTD (both in Counter-Strike), and latter (VGUI2) introduced with Half-Life 1.1.0.9 update alongside with the release of Steam Beta (and Steam Tracker) in 2002. GoldSrc's VGUI2 was later updated again in 2003 (with the release of Steam) and now being used to render the game main menu (replacing old menu which was restricted to 640x480). Early GoldSrc games on Steam (around 2003 until Steam update in 2005/2006), can have it's VGUI skins changed when you select a different skins on Steam client, as early GoldSrc games use TrackerScheme.res file located on 🖿Steam\platform\resource or 🖿Steam\skins\skin-name\platform\resource folder, instead of 🖿platform folder on the game files.

VGUI2 in GoldSrc uses the Steam green skin, which was also used in Steam client when it was initially launched in 2003.

Since Half-Life 25th Anniversary Update (released in November 2023), VGUI & VGUI2 on all GoldSrc games (that are based on top of Half-Life) now scales on higher resolutions (1440p, 4K/3840x2160 or higher).

VGUI in Source and Source 2

Comparison between VGUI UI scale "1" (small) and "2" (big). Screenshot from Counter-Strike: Source on Team Fortress 2 branch.
(Click to view if GIF does not play automatically).

Source Source and some Source 2 Source 2 games[confirm] (the latter is only used for console UI in Half-Life: Alyx when launched with -console, and Half-Life 2 fallback HUD when Half-Life: Alyx is launched without VR) only uses VGUI2. Due to this wiki historically documenting Source more than GoldSrc, VGUI2 is oftentimes interchangeably referred to as VGUI.

Unlike GoldSrc VGUI, VGUI in Source cannot be snapped to the another window or the corner of the screen, but it does have fade in/out animations.

When Steam Deck was launched, Valve updated Half-Life 2 and Portal in 2022 to add a VGUI-based Gamepad UI, which was optimized for handheld consoles and game controllers. It also scales properly at higher resolution, however, Gamepad UI was designed for 16:10 aspect ratio, which the Steam Deck uses, and while it was usable on 16:9 aspect ratio, it was not centered properly, and on 5:4 and 4:3 aspect ratio, causes the right-side of the UI to get clipped.

As of 2025, with the release of Half-Life 2 and Half-Life 2: Deathmatch 20th Anniversary Update (in Nov 2024) and in games such as Team Fortress 2 (since April 2024), and February 18, 2025 update for Counter-Strike: Source, Day of Defeat: Source, Half-Life Deathmatch: Source and Half-Life 2: Deathmatch (upgrading these games to Team Fortress 2 branch), and Portal in May 2025, VGUI now scales on higher resolutions (1440p, 4K/3840x2160 or higher).

About category

This page contains articles and documentations related to VGUI and VGUI2.

Subcategories

This category has the following 3 subcategories, out of 3 total.

C

H