Difference between revisions of "GetElementSize"
Jump to navigation
Jump to search
Leslie Brown (talk | contribs) (Created page with 'You can set the position of an AGI based on the dimensions of its parent element using the getElementSize(...) method. The example code below positions m_hTestAgi in the center o…') |
Leslie Brown (talk | contribs) |
||
Line 7: | Line 7: | ||
Agi::SetXY(m_hTestAgi, 0.5f*fWidth, 0.5f*fHeight); | Agi::SetXY(m_hTestAgi, 0.5f*fWidth, 0.5f*fHeight); | ||
− | </pre> | + | </pre> |
+ | [[Category:AGI_System]][[Category:Console_Object_Component]][[Category:Development_Articles]][[Category:Tutorials]][[Category:SDK]] |
Latest revision as of 02:18, 26 February 2013
You can set the position of an AGI based on the dimensions of its parent element using the getElementSize(...) method. The example code below positions m_hTestAgi in the center of the element.
float fHeight = 0.0f; float fWidth = 0.0f; getElementSize(fWidth, fHeight); Agi::SetXY(m_hTestAgi, 0.5f*fWidth, 0.5f*fHeight);