Manipulating the Goldsrc game menu items: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
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. | 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 / {{code|ProportionalBaseHeightHD}} | |||
== Font size == | == Font size == | ||
Font size is not proportional to resolution, but only to {{code|ProportionalBaseHeightHD}}. | Font size is not proportional to resolution, but only to {{code|ProportionalBaseHeightHD}}. | ||
Height of smallcap letters is {{code|MenuLarge.Tall}} * 11 / 28 * 1080 / {{code|ProportionalBaseHeightHD}}. |
Revision as of 13:32, 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.
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.