Garry's Mod Wiki

Garry's Mod Wiki

  number, number Panel:ScreenToLocal( number screenX, number screenY )

Description

Translates global screen coordinate to coordinates relative to the panel.

See also Panel:LocalToScreen.

This function uses a cached value for the screen position of the panel, computed at the end of the last VGUI Think/Layout pass, so inaccurate results may be returned if the panel or any of its ancestors have been re-positioned outside of PANEL:Think or PANEL:PerformLayout within the last frame.

Arguments

1 number screenX
The x coordinate of the screen position to be translated.
2 number screenY
The y coordinate of the screed position be to translated.

Returns

1 number
Relativeposition X
2 number
Relativeposition Y

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...