Garry's Mod

Garry's Mod

36 ratings
Garry's Mod Custom Main Menu
By VMan_2002
How to customize the Garry's Mod main menu!
   
Award
Favorite
Favorited
Unfavorite
This guide seems to be outdated nope im dumb
Changes have seemingly been made to the menu format since the time this guide was initially posted (25 Mar, 2018)

nope im dumb i just misread my own guide
Getting Started
The menu works by using a .html file, which can be found at:
  • steam/SteamApps/common/GarrysMod/garrysmod/html/menu.html
Unless you want to do major design changes to the menu, unlike what's in this guide, you should not edit menu.html, and instead enter templates folder.

You should backup the entire html folder in case you make an irreversible mistake.

There will be 6 .html files inside, but the one we want to edit is called "main.html"
Right click, and choose 'Edit'
You can also use Notepad++, which you can find here[notepad-plus-plus.org] and choose 'Edit with Notepad++' instead of 'Edit'

The line highlighted in blue is one that I added, to move to a new custom menu. You can do what you want instead, but note this is how you do it:
Directory:
<li><a ng-href="#/directory/" ng-♥♥♥♥♥♥="'ButtonText'"></a></li>
Game Command:
<li><a ng-click="MenuOption( this, 'engine gamecommand')" ng-♥♥♥♥♥♥="'ButtonText'"></a></li>

Example with Command:
<li><a ng-click="MenuOption( this, 'engine toggleconsole')" ng-♥♥♥♥♥♥="'Show Console'"></a></li>
Defining Your New Menu Directory
If you wanted to make a new menu directory, you'll first need to define it. Go to
html/js/menu/menuApp.js
then right click and choose 'Edit' (or 'Edit with Notepad++' if it is visible).

The line in blue is the new one I added.
Example:
$routeProvider.when('/testcustom/', { templateUrl: 'template/testcustom.html' } );
Now that your menu is defined, you also need to create it!
Making Your Menu Directory
Now copy + paste main.html which can be found at html/template
and name it how what you see as "testcustom.html" in this:
$routeProvider.when('/testcustom/', { templateUrl: 'template/testcustom.html' } );
so I named mine
testcustom.html
and fill it with what you want.

Example
<div class="page" ng-controller="ControllerMain"> <div class="options"> <ul> <li><h2 style="color:DodgerBlue">Custom Menu</h2></li> <li>&nbsp;</li> <li><a ng-href="#/" ng-♥♥♥♥♥♥="'Back'"></a></li> <li>&nbsp;</li> <li><a ng-click="MenuOption( this, 'engine toggleconsole')" ng-♥♥♥♥♥♥="'Show Console'"></a></li> <li>&nbsp;</li> <li><a ng-click="MenuOption( this, 'engine map gm_construct')" ng-♥♥♥♥♥♥="'Play GM_Construct'"></a></li> <li><a ng-click="MenuOption( this, 'engine echo Test in Menu')" ng-♥♥♥♥♥♥="'Test Custom Option'"></a></li> <li>&nbsp;</li> <li><a ng-click="MenuOption( this, 'engine custom_test')" ng-♥♥♥♥♥♥="'Custom Test'"></a></li> <li><a ng-click="MenuOption( this, 'engine echo red')" ng-♥♥♥♥♥♥="'Option Red'" style="color:Red"></a></li> <li><a ng-click="MenuOption( this, 'engine echo palegoldenrod')" ng-♥♥♥♥♥♥="'Option PaleGoldenrod'" style="color:PaleGoldenrod"></a></li> <li><h2><a ng-click="MenuOption( this, 'engine echo header')" ng-♥♥♥♥♥♥="'Custom Header'"></h2></a></li> <li><a ng-click="MenuOption( this, 'engine echo font')" ng-♥♥♥♥♥♥="'Font Times New Roman'" style="font-family: 'Times New Roman'"></a></li> <li><h6>https://htmlcolorcodes.com/color-names/</h6></li> <li>&nbsp;</li> <li ng-show="InGame"> <a ng-click="MenuOption( this, 'engine disconnect');" ng-♥♥♥♥♥♥="'disconnect'"></a> </li> <li><a ng-click="MenuOption( this, 'engine quit')" ng-♥♥♥♥♥♥="'quit'"></a></li> </ul> </div> </div>
Result:
https://htmlcolorcodes.com/color-names/ for HTML color names (like Red or PaleGoldenrod or DodgerBlue)
One Final Important Note
Garry's Mod likes to overwrite the menu after updating, so inside a new folder outside of your Steam directory, you should make a batch file similar to this one:
xcopy "new/html" "C:\Program Files\Steam\SteamApps\common\GarrysMod\garrysmod\html" /V /C /F /R /J /S /I /Y
Save it and name it 'copy.bat', and make this folder structure:
  • new
  •   html
  • copy.bat
where html is inside new.

Then copy all of your custom html files inside the new html folder.
19 Comments
MARK2580 17 Mar @ 9:15am 
As I understand it, rubat broke something again, now the engine commands don’t work, an error just appears in the console, for example “Not running engine cmd incrementvar net_graph 0 4 1”
GucciBucketHat 20 Aug, 2023 @ 8:30pm 
where gordon stares at me
GucciBucketHat 20 Aug, 2023 @ 8:30pm 
I want a half life custom menu
Pecel 23 Jul, 2023 @ 12:10am 
how do i allow autoplay music?
chel.chopokayfu 15 Jul, 2023 @ 2:07am 
Good guidance, thank you! I would like to know how to change the color of the selection from yellow (when you hover the mouse) to another color
professional "guy" 10 Nov, 2022 @ 8:32pm 
where are the main parts for editing the menu. i have notepad++ open rn and i have no idea where the main stuff for the custom menu is
CRD716 | civilnetworks.net 9 May, 2022 @ 2:30pm 
To anyone with those hearts, just ctrl f for "ng-" and then you'll see what steam is censoring (slur for transgenders)
cactusninja 8 May, 2022 @ 2:09am 
♥♥♥♥♥♥="'disconnect'"></a> it looks like that for me can anyone help?
blackskytf2 22 Apr, 2022 @ 8:09am 
thanks, but how to add not only buttons but sliders or checkboxes?
Mr. Vita 6 Jun, 2021 @ 10:41am 
ok well that make sense when i was testing commands ingame