Manipulating the Goldsrc game menu items

From Valve Developer Community
Jump to navigation Jump to search

Stub

This article or section is a stub. You can help by expanding it.

Constructing the menu items

The sizing and position of the menu items are directly influenced by the ProportionalBaseWidthHD or ProportionalBaseHeightHD parameters from 🖿resource/trackerscheme.res, even if hd_background is set to 0 in 🖿liblist.gam.

Item spacing

The spacing between items equals to MenuItemHeight * 1080 / ProportionalBaseHeightHD.

Left padding

In-game left padding equals to GameMenuInset x window height / ProportionalBaseHeightHD when window height > ProportionalBaseHeightHD. When window height <= ProportionalBaseHeightHD, then the GameMenuInset parameter seems to be an absolute value, in pixels.

I found an edge case in resolution 720x480 where the padding was scaled down despite what's written above. The logic was tested and worked on resolutions 1920x1080, 1680x1050, 1600x900, 1280x720 and 1176x664.

Bottom padding

Although apparently not set anywhere, bottom padding equals to 56 x 1080 / ProportionalBaseHeightHD

Font size

Font size is not proportional to resolution, but only to ProportionalBaseHeightHD.

Height of smallcap letters is MenuLarge.Tall * 11 / 28 * 1080 / ProportionalBaseHeightHD.