Panel.GetPos
From GMod Wiki
Function | |
Syntax | Panel:GetPos( ) |
Description: | |
Returns the position of this panel. | |
Returns: | Number x, Number y |
In Object: | Panel |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Panel.GetPos]Panel.GetPos [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Returns the 2D coordinates of this panel, relatively to the parent |
---|---|
Used on | |
Code | local x,y = self:GetPos(); |
Output | N/A |
Additional Notes
- It returns two values, x and y.
- Cordinates are based off of it's parent, if the panel is parented
- If it is not parented, it will return the coordinates on screen