Garry's Mod Wiki

SourceScheme

This page is best read by those pretty familiar with garrysmod already, New and Junior Developers are NOT encourage to MODIFY these files without having a proper understanding of not only how source games handle their files but also how garrysmod itself handles its filesystem as modifying these files without proper due diligence can break the game in unexpected ways.
Modifying these files are not apart of the addon system which means there are very limited or no safeguards, Before doing anything ensure you have an unedited version of the file you can restore should your edits not be fixable.

What is the SourceScheme File

The SourceScheme.res file found HERE this file is a Valve KeyValues format document that defines VGUI panels. Similar files include ChatScheme, ClientScheme and LoadingDialogVAC. There may be more but at the time of writing these are the other ones I see.

Why Customize it?

Above all else, there is absolutely no NEED to customize file. the game runs and functions perfectly with the regular file shipped to game. However with that being said, modifying these files can allow for some customization of panels you cant access through Derma. In this file that's most notably the Console and the Options Menu panels.

File Structure

The first value is the Scheme key, this will be the root key in which all other keys will need to be stored.

Colors

The first subsection within the file, this will contain all the color variables that we will use in the following subsection of BaseSettings

The default colors contained within this section are

RGBA Preview Name
255 255 255 255 White White
221 221 221 255 OffWhite OffWhite
190 190 190 255 DullWhite DullWhite
255 155 0 255 Orange Orange
0 0 0 128 TransparentBlack TransparentBlack
0 0 0 255 Black Black
0 0 0 0 Blank Blank
108 111 114 250 GMod_BG_Opaque GMod_BG_Opaque
108 111 114 0 GMod_BG GMod_BG
255 255 255 0 GMod_WhiteBlank GMod_WhiteBlank
157 194 80 255 SteamLightGreen SteamLightGreen
79 79 79 255 AchievementsLightGrey AchievementsLightGrey
55 55 55 255 AchievementsDarkGrey AchievementsDarkGrey
130 130 130 255 AchievementsInactiveFG AchievementsInactiveFG

Adding your own colors this key is simple just follow the formatting of the document.

BaseSettings

Here is where you can actually customize the color of the panels.

Because of Garrys Mods progression over time some of these panels are not used anywhere anymore but their remains still exist in this file, I will point out all the values that I could note identify.

Also some fields are conditional, indicated by the [$WIN32] or [$X360] Here is the relevant Source 2013 SDK code for how these are elvaluated

For Each Chunk of keys I break them out in a code block that will have enhanced descriptions and unknown keys commented out

Border

// The Default Border that surrounds most/all of the vgui elements //Border.Bright "UNKNOWN" //Border.Dark "UNKNOWN" Border.Selection "Black" // Border for Elements that should standout for selection - Option Menu "Accept Button" Border.DarkSolid "40 40 40 255" // Border used to make elements stand out from Background Border.Subtle "80 80 80 255" // Subtle Border used on elements.

Button

// Button - Single Click Action Buttons Button.TextColor "82 82 82 255" // Default Text Color Button.BgColor "227 227 227 255" // Default Background Color Button.ArmedTextColor "46 114 178 255" // Hover Text Color Button.ArmedBgColor "240 240 240 255" // Hover Background Color Button.DepressedTextColor "White" // Clicked Text Color Button.DepressedBgColor "84 178 245 255" // Clicked Background Color //Button.FocusBorderColor "UNKNOWN"

CheckButtons

// CheckButtons CheckButton.TextColor "White" // Text Label Color CheckButton.SelectedTextColor "White" // Checked Text Label Color CheckButton.BgColor "White" // Background of Checkbox Area CheckButton.Border1 "Border.Subtle" // Border Color of Left and Top Walls CheckButton.Border2 "Border.Subtle" // Border Color of Right and Bottom Walls CheckButton.Check "Black" // color of the check itself CheckButton.DisabledFgColor "Black" // color of the check itself when disabled CheckButton.HighlightFgColor "OffWhite" // Hovered Text Color CheckButton.ArmedBgColor "Blank" // Hovered Background Color //CheckButton.DepressedBgColor "UNKNOWN" CheckButton.DisabledBgColor "180 180 180 255" // Disabled Background Color

ComboBoxButton

This references the arrow within the ComboBox and not the actual ComboBox

ComboBoxButton.ArrowColor "81 81 81 255" // Default Color of Triangle ComboBoxButton.ArmedArrowColor "110 110 110 255" // Hovered Triangle Color ComboBoxButton.BgColor "GMod_WhiteBlank" // Box Surrounding Triangle ComboBoxButton.DisabledBgColor "GMod_WhiteBlank" // Disabled Background

Frames

// Frames Frame.TitleTextInsetX 16 // Title Text Inset Frame.ClientInsetX 8 // Frame Padding for Child Elements Along X Axis Frame.ClientInsetY 6 // Frame Padding for Child Elements Along Y Axis Frame.BgColor "GMod_BG_Opaque" // Default Background Color Frame.OutOfFocusBgColor "97 100 102 240" // Color When Not Focused Frame.FocusTransitionEffectTime "0.3" // Time it takes to transition between focus states Frame.TransitionEffectTime "0.3" // Time it takes for panel to open (and close?) Frame.AutoSnapRange "0" // Distance (In Pixels?) it takes to snap to another object FrameGrip.Color1 "200 200 200 196" // Bottom Right Grip Smaller Lines FrameGrip.Color2 "0 0 0 196" // Bottom Right Grid Larger Lines FrameTitleButton.FgColor "200 200 200 196" // In Focus Color of X for close button FrameTitleButton.BgColor "GMod_BG" // In Focus Color of Background Surrounding X FrameTitleButton.DisabledFgColor "255 255 255 192" // Out of Focus Color of X FrameTitleButton.DisabledBgColor "GMod_BG" // Out of Focus Color of Background Surrounding X FrameTitleBar.Font "UiBold" // Font Used for Name of Frame FrameTitleBar.TextColor "255 255 255 204" // Default / Focused Text Color FrameTitleBar.BgColor "GMod_BG" // Default / Focused Background Color FrameTitleBar.DisabledTextColor "255 255 255 91" // Out of Focus Text Color FrameTitleBar.DisabledBgColor "GMod_BG" // Out of Focus Background Color // UnUsed in Gmod - Frame Button for Min, Max, Close Actions // This also isnt positioned properly so it just needs to stay invis FrameSystemButton.FgColor "Blank" FrameSystemButton.BgColor "Blank" FrameSystemButton.Icon "" FrameSystemButton.DisabledIcon ""

Graph Panel

I could not locate this panel anywhere in my testing

// UNKNOWN //GraphPanel.FgColor "White" //GraphPanel.BgColor "TransparentBlack"

Labels

// Labels Label.TextDullColor "DullWhite" // Color of non Interactive Label Label.TextColor "OffWhite" // Default Label Color //Label.TextBrightColor "UNKNOWN" Label.SelectedTextColor "White" // Color When Text Is Selected Label.BgColor "GMod_BG" // Default Label Background Color Label.DisabledFgColor1 "110 110 110 255" // DropShadow Color of Disabled Labels Label.DisabledFgColor2 "50 50 50 255" // Main Color of Disabled Labels

Menu

// Menu - Console Autocompletion Menu.TextColor "80 80 80 255" Menu.BgColor "233 233 233 255" Menu.ArmedTextColor "White" Menu.ArmedBgColor "132 183 241 255" Menu.TextInset "6"

Panels

//Panel.FgColor "UNKNOWN" Panel.BgColor "108 111 114 0" // Fun Fact Changing this Fills the entire screen with this color, dont know why this value works but it does.

ProgressBar

// Progress Bar Used When Joining a Server ProgressBar.FgColor "White" // The White Boxes that Fill Up ProgressBar.BgColor "TransparentBlack" // The Background

PropertySheet

// PropertySheet - Main Parts of the Options Menu PropertySheet.TextColor "10 10 10 200" // Default Text PropertySheet.SelectedTextColor "10 10 10 255" // Text Color for Currently Slected Tab //PropertySheet.SelectedBgColor "UNKNOWN" PropertySheet.TransitionEffectTime "0.25" // time to change from one tab to another //PropertySheet.BgColor "UNKNOWN"

Radio Button

Could Not Locate

//RadioButton.TextColor "OffWhite" //RadioButton.SelectedTextColor "White"

RichText

// Console Text RichText.TextColor "OffWhite" // Default Text Color RichText.BgColor "TransparentBlack" // Background for the Text Area RichText.SelectedTextColor "White" // Text Color when highlighted RichText.SelectedBgColor "0 168 255 204" // Background Color for selected text characters

ScrollBar

// Scrollbar ScrollBar.Wide 15 // Scrollbar Up and Down Buttons (Console) ScrollBarButton.FgColor "60 60 60 255" // Color of Arrows ScrollBarButton.BgColor "207 207 207 255" // Background of Buttons ScrollBarButton.ArmedFgColor "20 65 72 255" // Hover Text Color ScrollBarButton.ArmedBgColor "210 237 255 255" // Hover Background Color ScrollBarButton.DepressedFgColor "9 119 226 255" // Clicked Text Color ScrollBarButton.DepressedBgColor "31 207 248 255" // Clicked Background // Scrollbar Track and Grip ScrollBarSlider.FgColor "220 220 220 255" // Slider Grip Color ScrollBarSlider.BgColor "184 184 184 229" // Sliders Track Color

SectionedListPanel

// Options --> KeyBoard SectionedListPanel.HeaderTextColor "50 50 50 255" // Header Text Color SectionedListPanel.HeaderBgColor "Blank" // Header Background Color SectionedListPanel.DividerColor "0 0 0 150" // Divider Color //SectionedListPanel.TextColor "UNKNOWN" SectionedListPanel.BrightTextColor "40 40 40 255" // Text Color of Each Item in List SectionedListPanel.BgColor "White" // Background of Entire Element SectionedListPanel.SelectedTextColor "White" // Color of Selected Text SectionedListPanel.SelectedBgColor "0 168 255 204" // Color of Selected Text Background SectionedListPanel.OutOfFocusSelectedTextColor "Black" // Selected Text Color When Out of Focus SectionedListPanel.OutOfFocusSelectedBgColor "132 183 241 100" // Background of Selected Text When out of Focus

Slider

// Slider - Numerical Range Selector Thing Slider.NobColor "220 220 220 255" // Color of The Thing you Grab Slider.TextColor "180 180 180 255" // Text and Markers Below Element Slider.TrackColor "184 184 184 229" // Track Color Slider.DisabledTextColor1 "110 110 110 255" // Accent Color of Disabled Markers Slider.DisabledTextColor2 "50 50 50 255" // Main Color of Disabled Markers

Text Entry

// Text Entry TextEntry.TextColor "10 10 10 255" // Default Text Color TextEntry.BgColor "White" // Default Background Color TextEntry.CursorColor "10 10 10 255" // Blinking Cursor Color TextEntry.DisabledTextColor "128 128 128 255" // Disabled Text Color TextEntry.DisabledBgColor "192 192 192 255" // Disabled Background Color TextEntry.SelectedTextColor "10 10 10 255" // Selected Text Color TextEntry.SelectedBgColor "0 168 255 204" // Selected Background Color TextEntry.OutOfFocusSelectedBgColor "132 183 241 100" // Out of Focus Background Color TextEntry.FocusEdgeColor "UNKNOWN"

ToggleButton

Could Not Locate

// UNKNOWN //ToggleButton.SelectedTextColor "UNKOWN"

ToolTip

// ToolTip Tooltip.TextColor "110 102 60 255" // Color of Text in Popup Tooltip Tooltip.BgColor "249 238 181 255" // Color of Background in Popup Tooltip

Rest of section (Unable to identify)

// UNKNOWN //TreeView.BgColor "TransparentBlack" // UNKNOWN //WizardSubPanel.BgColor "Blank" // scheme-specific colors // UNKNOWN //MainMenu.TextColor "White" //MainMenu.ArmedTextColor "200 200 200 255" //MainMenu.DepressedTextColor "192 186 80 255" //MainMenu.MenuItemHeight "30" //MainMenu.Inset "32" //MainMenu.Backdrop "0 0 0 156" // UNKNOWN //Console.TextColor "OffWhite" //Console.DevTextColor "White" // UNKNOWN //NewGame.TextColor "White" //NewGame.FillColor "Black" //NewGame.SelectionColor "Orange" //NewGame.DisabledColor "128 128 128 196" // UNKNOWN //"QuickListBGDeselected" "AchievementsDarkGrey" //"QuickListBGSelected" "AchievementsLightGrey"

BitmapFontFiles

Contains a singular special bitmap font used by the UI buttons.

Source:

// Bitmap Fonts are ****VERY*** expensive static memory resources so they are purposely sparse BitmapFontFiles { // UI buttons, custom font, (256x64) "Buttons" "materials/vgui/fonts/buttons_32.vbf" }

Fonts

This is where all the fonts on Default Fonts are created. We strongly advise against changing the default ones in any way as some addons may use these. However you could potentially add your own for your own SourceScheme.res Modifications, like changing the font of the console.

Borders

These keys have not been tested at the writing of this page. Although they should be relatively self explanatory.

Custom Font Files

Description provided in code

Source:

// specifies all the custom (non-system) font files that need to be loaded to service the above described fonts CustomFontFiles { "1" "resource/HALFLIFE2.ttf" "2" "resource/HL2EP2.ttf" "3" "resource/marlett.ttf" }