Panel/ScreenToLocal

From Garry's Mod
Jump to: navigation, search
 Panel:ScreenToLocal( )

Contents

Description

Translates global screen coordinate to coordinates relative to the panel.

See also Panel:LocalToScreen.

WARNING

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

Arguments

number screenX

The x coordinate of the screen position to be translated.

Arguments

number screenY

The y coordinate of the screed position be to translated.

Returns

number

Relativeposition X

Returns

number

Relativeposition Y
Personal tools
Navigation