gui.getComponentPosition

Returns the X/Y position of an editor GUI component.

Prototype

  1. nX, nY = gui.getComponentPosition ( hComponent )

Description

Returns the position of an editor GUI component in absolute screen terms, where 0,0 is in the top left corner of the screen.


Parameters

hComponent - valid GUI component handle


Return values

nX - x coordinate in px
nY - y coordinate in px


Sample

  1. local x,y = gui.getComponentPosition (gui.getComponent ( "b1" ))
  2. log.message ( "POS "..x.." "..y )

Available since ShiVa 2.0