UIElement.ChangeParent (Civ5 API)

From Civilization Modding Wiki
Jump to: navigation, search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This method is declared by ControlBase.

This is an instance method, invoke it with a colon.


Usage

void UIElement:ChangeParent(Image parent)


Parameters

parent: No description available.


Source code samples

Redundant occurences have been removed.

UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0459
self.m_Instance.Anchor:ChangeParent( g_SelectedContainer );
0464
self.m_Instance.Anchor:ChangeParent( Controls.AirCraftFlags );
0466
self.m_Instance.Anchor:ChangeParent( Controls.CivilianFlags );
0468
self.m_Instance.Anchor:ChangeParent( Controls.GarrisonFlags );
0470
self.m_Instance.Anchor:ChangeParent( Controls.MilitaryFlags );
1550
g_SelectedFlag.m_Instance.Anchor:ChangeParent( Controls.MilitaryFlags );


YieldIconManager.lua

UI/InGame/YieldIconManager.lua
0100
record.AnchorInstance.Anchor:ChangeParent( Controls.YieldStore );
0132
imageInstance.Image:ChangeParent( parent );
0144
textImageInstance.Image:ChangeParent( imageInstance.Image );
0198
instance.Anchor:ChangeParent( Controls.Scrap );
0203
instance.Image:ChangeParent( Controls.Scrap );



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.