API:DetachWindowFromWorldObject
From RoR Wiki
UI Lua API · WorldObject functions
Version: WAR 1.4.8
Stops a window from following a world object.
DetachWindowFromWorldObject(windowName, worldObjectId)
Arguments
- windowName
string– Name of the attached window.- worldObjectId
number– ID of the world object it was attached to.
Returns
Nothing.
Details
- Removes the window from the object's list of attached windows (see AttachWindowToWorldObject). When the last window is removed, the object's entry is removed too.
- If the window is not attached to that object, nothing happens.
- The window keeps its last position and showing state. It is not hidden or destroyed.
- The error message for a missing window names the function
DetachWindowToWorldObject, with "To" instead of "From". - The function needs at least two arguments and only reads the last two.
Errors
Error in function call 'DetachWindowToWorldObject': window %s does not exist
Example
From default/easystem_eventtext/source/system_eventtext.lua:
-- Destroy anchor window. DetachWindowFromWorldObject( self.m_Anchor, self.m_TargetObject ) DestroyWindow( self.m_Anchor )
