API:GetTemplateWindowDimensions
From RoR Wiki
UI Lua API · Interface functions
Version: WAR 1.4.8
Returns the size defined for a window template.
width, height = GetTemplateWindowDimensions(templateName)
Arguments
- templateName
string– Name of a window template defined in the UI's XML files.
Returns
- width, height
number– The width and height stored in the template's size definition, as whole numbers.
Details
- No window is created. The values are read from the template definition, not from any window made from it, so changes made to such windows at run time are not reflected.
- If the template does not exist, the error is logged and nothing is returned.
- The function needs at least one argument and only reads the last one.
Errors
This is written to the UI log; the call returns normally.
Error in function call 'GetTemplateWindowDimensions': Window template %s does not exist.
Example
From ea_targetwindow/source/targetwindow.lua:
hostileTargetFrame.m_SizeX, hostileTargetFrame.m_SizeY = GetTemplateWindowDimensions( hostileTargetFrame.m_Template )
