Garry's Mod Wiki

Revision Difference

PANEL:OnScreenSizeChanged#552829

<function name="OnScreenSizeChanged" parent="PANEL" type="hook"> <ishook>yes</ishook>⤶ <description> Called when the player's screen resolution of the game changes. <page>Global.ScrW</page> and <page>Global.ScrH</page> will return the new values when this hook is called. </description> <realm>Client</realm> <predicted>No</predicted>⤶ <args> <arg name="oldWidth" type="number">The previous width of the game's window</arg> <arg name="oldHeight" type="number">The previous height of the game's window</arg> <arg name="newWidth" type="number" added="2023.10.24">The new/current width of the game's window.</arg> <arg name="newHeight" type="number" added="2023.10.24">The new/current height of the game's window.</arg> </args> </function>