API:WindowGetLayer
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Returns the layer a window is drawn on.
layer = WindowGetLayer(windowName)
Arguments
- windowName
string– Name of the window.
Returns
- layer
number– The window's layer. Compare it with theWindow.Layersconstants listed on WindowSetLayer.
Details
- The value is a whole number from 0 to 255.
- The stock UI never calls
WindowGetLayer.
Errors
Error in function call 'WindowGetLayer': Window %s does not exist
Example
A minimal example built from the signature above:
if WindowGetLayer( "MyWindow" ) ~= Window.Layers.POPUP then
WindowSetLayer( "MyWindow", Window.Layers.POPUP )
end
