OnResolutionChange: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Event|Client|1.0}} {{FuncDescription|Called when the size of the game window changes. Either due to manual resizing or through settings.}} {{FuncSyntax|OnResolutionCh..." |
mNo edit summary |
||
Line 18: | Line 18: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{GameClientEvents}} |
Latest revision as of 08:40, 16 January 2020
Description
Called when the size of the game window changes. Either due to manual resizing or through settings.
Syntax
OnResolutionChange(width, height)
Parameters
- width
New width (x) size. - height
New height (y) size.
Example
function OnResolutionChange(width, height)
AddPlayerChat("Resolution changed to "..width.."x"..height)
end
AddEvent("OnResolutionChange", OnResolutionChange)