API:WindowGetScale
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Returns a window's scale.
scale = WindowGetScale(windowName)
Arguments
- windowName
string– Name of the window.
Returns
- scale
number– The window's scale. 1 means unscaled.
Details
- The scale is absolute, not relative to the parent. WindowSetScale and WindowSetRelativeScale write the same absolute value to all descendants.
- A window's size on screen is its dimensions (WindowGetDimensions) multiplied by this value.
Errors
Error in function call 'WindowGetScale': Window %s does not exist
Example
Copying a window's size and scale to a resize frame, from easystem_windowutils/source/windowutils.lua:
local width, height = WindowGetDimensions( windowName ) local scale = WindowGetScale(windowName) WindowSetScale( "ResizingWindowFrame", scale ) WindowSetDimensions( "ResizingWindowFrame", width, height )
