VGUI:Custom Title Screen FAQ: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (clean up, added orphan, deadend tags)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
NOTE: you must create a basic MOD folder from the "Create A Mod" option, on the green Source SDK box before you begin planning your MOD/Game, you need to do this, in order to get hold a files you WILL have to edit, in order for your MOD to be usable.
{{Multiple issues|
 
{{Dead end|date=January 2024}}
Just thought I'd safe some poor first-timers the trouble I've had, trying to set up my first MOD.
{{Orphan|date=January 2024}}
 
}}


This page hopes to resolve some frequently asked questions regarding customization of the title screen.
This page hopes to resolve some frequently asked questions regarding customization of the title screen.
Line 10: Line 10:
==How do I get a panel on the main menu?==
==How do I get a panel on the main menu?==


Set its parent as the GAMEUI base panel.  
Set its parent as the GAMEUI base panel.


  vgui::VPANEL GameUIRoot = enginevgui->GetPanel( PANEL_GAMEUIDLL );
  vgui::VPANEL GameUIRoot = enginevgui->GetPanel( PANEL_GAMEUIDLL );
Line 27: Line 27:
  vgui::surface()->MovePopupToBack( GetVPanel() );
  vgui::surface()->MovePopupToBack( GetVPanel() );


 
'''Bold text'''


[[Category:VGUI|C]]
[[Category:VGUI|C]]
'''Bold text'''

Latest revision as of 10:17, 21 January 2024

Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024

This page hopes to resolve some frequently asked questions regarding customization of the title screen.

The title screen/main menu isn't defined in the Source SDK. It's defined in GameUI.dll. Modders are unable to edit this file, so customizing the main menu requires a few hacks.

How do I get a panel on the main menu?

Set its parent as the GAMEUI base panel.

vgui::VPANEL GameUIRoot = enginevgui->GetPanel( PANEL_GAMEUIDLL );
SetParent( GameUIRoot );

I can't interact with buttons on my GameUI panel!

This requires some hacking. First of all you need to make your panel a popup. In your panel's constructor do:

MakePopup();

It'll now act like a window/frame. You will be able to interact with it but when you open a new window, like the console, you will be able to push it behind this panel.

The best way I've found to prevent this is to always force it to the back by putting this in your panels Think function

vgui::surface()->MovePopupToBack( GetVPanel() );

Bold text