Manipulating the Goldsrc game menu items: Difference between revisions
Line 9: | Line 9: | ||
== Left padding == | == Left padding == | ||
In-game left padding equals to {{code|GameMenuInset}} x window height / {{code|ProportionalBaseHeightHD}} when window height > {{code|ProportionalBaseHeightHD}}. When window height <= {{code|ProportionalBaseHeightHD}}, then the {{code|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. |
Revision as of 08:10, 31 August 2025
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 resolution.Y * MenuItemHeight / ProportionalBaseHeightHD.
The items are aligned to the bottom of the window, with an inset calculated based on MenuItemHeight, but how?
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.