Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:DestroyWindow

From RoR Wiki

UI Lua API · Interface functions
Version: WAR 1.4.8

Destroys a window and all of its children.

DestroyWindow(windowName)

Arguments

windowName
string – Name of the window to destroy.

Returns

Nothing.

Details

  • The window and every window below it are removed.
  • If the window, or one of its children, is the window the client currently treats as active, destruction is deferred: the window is put on a list and destroyed during a later interface update, and a warning is logged. Until then the window still exists.
  • A window waiting for deferred destruction is taken off the list again if CreateWindow or CreateWindowFromTemplate is called with its name. The old window is then kept instead of being destroyed.
  • If the destroyed window had mouse capture, was the hovered window, or was the active window, the client clears that state.
  • The root window cannot be destroyed.

Errors

These are written to the UI log; the call returns normally.

  • ERROR: Calling 'DestroyWindow' on window '%s' does not exist.
  • ERROR: The root window cannot be deleted.
  • Warning: Calling 'DestroyWindow' on window '%s' has been deferred because this window or one of its children is active.

Example

From easystem_glyphdisplay/source/glyphdisplay.lua:

DestroyWindow(GlyphDisplayInstances[instanceId].windowName)

From easystem_eventtext/source/system_eventtext.lua:

DestroyWindow( self.m_Anchor )

See also