Add vgui2 codes to SDK
VGUI2 offers more features than the old VGUI. I think it should be included in the SDK since CS 1.6 uses it.
CS 1.6 uses VGUI 1, VGUI 2 is for Source games.
Nope, CS 1.6 does use VGUI2 with surface v028. You can use disassemble softwares to check it.
@kungfulon is it VGUI_Surface026 that's used by the engine?
ah yes. i mistyped the version. thanks for correcting me >.<
I strongly support the exposure of VGUI2 features to the SDK. To make this concrete, I propose a new UserMessage implementation that allows modders to use the VGUI2 engine (already present in CS 1.6) to create modern, lightweight menus without relying on heavy MOTD/HTML windows.
Here is a detailed specification for the feature:
1. Expanded Color System (Tags) Currently, we are severely limited to ~4 colors. I propose expanding the native tag parser to support a standard palette of 15 essential colors using simple abbreviations, plus Hex support for specific needs.
Proposed Tag List (Shortcodes):
Classics: \w (White), \r (Red), \y (Yellow), \d (Default/Grey).
New Additions:
\g (Green), \b (Blue), \c (Cyan), \m (Magenta), \o (Orange)
\p (Purple), \l (Lime), \pk (Pink), \br (Brown), \bl (Black)
Hex Fallback: {#RRGGBB} (For any custom color not listed above).
2. Layout & Alignment (Auto-Size & Columns) The VGUI panel should handle layout dynamically:
- Auto-Size Background: The background box should optionally scale to wrap the content (as seen in Fig 1 of the mockup), instead of covering the full screen.
- Styling & Translucency: Support for RGBA color definitions for both the Background and the Border. This allows for translucent backgrounds (e.g., see-through black) and semi-transparent borders to blend seamlessly with the game world.
- Right Alignment (R Suffix): Adding R to any color tag aligns the subsequent text to the Right edge of the panel.
- Usage:
\glR$5000-> Displays "$5000" in Gold, aligned to the Right. - Usage:
\rR[LOCKED]-> Displays "[LOCKED]" in Red, aligned to the Right.
- Usage:
3. Backward Compatibility (Legacy/Non-Official Clients)
To ensure this update does not cause Host_Error or crashes on older builds (non-steam/legacy protocols):
- Feature Negotiation: The server plugin queries
client_has_feature().
-Automatic Fallback: If the client does not support the new message, the plugin automatically falls back to the classic ShowMenu (White Text).
Result: Modern clients get the VGUI2 styled menu; Legacy clients get the functional classic menu. Zero friction, zero crashes.
4. Visual Mockup The image below demonstrates the Auto-Size capability (Left) vs. Full Layout (Right) using the proposed Color Tags and Right-Alignment logic.
@Zetsukt this works only on build 10210?
+1 - Update ... ?
tmp64/hl1_source_sdk has it.