You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anthony Ma edited this page May 25, 2015
·
1 revision
Inheriting components with txUI is accomplished with txUI.UIManager:inheritComponent. An example implementation is shown below.
local btn = txUI.Button:new({})
local newBtn = txUI.UIManager:inheritComponent(btn, {text = "New Button";})
The newBtn component is exactly the same as the btn component with the exception of text being overwritten with "New Button". Any number of fields can be overwritten this way, which allows for 'template' components.