Class WidgetTemplate
- Namespace
- TaleWorlds.GauntletUI.PrefabSystem
- Assembly
- TaleWorlds.GauntletUI.PrefabSystem.dll
public class WidgetTemplate
- Inheritance
-
WidgetTemplate
- Inherited Members
Constructors
WidgetTemplate(string)
public WidgetTemplate(string type)
Parameters
typestring
Properties
AllAttributes
public IEnumerable<WidgetAttributeTemplate> AllAttributes { get; }
Property Value
Attributes
public Dictionary<Type, Dictionary<string, WidgetAttributeTemplate>> Attributes { get; }
Property Value
ChildCount
public int ChildCount { get; }
Property Value
GivenParameters
public Dictionary<string, WidgetAttributeTemplate> GivenParameters { get; }
Property Value
Id
public string Id { get; }
Property Value
LogicalChildrenLocation
public bool LogicalChildrenLocation { get; }
Property Value
Prefab
public WidgetPrefab Prefab { get; }
Property Value
RootTemplate
public WidgetTemplate RootTemplate { get; }
Property Value
Tag
public object Tag { get; set; }
Property Value
Type
public string Type { get; }
Property Value
Methods
AddAttributeTo(WidgetAttributeContext, string, string)
public void AddAttributeTo(WidgetAttributeContext widgetAttributeContext, string name, string value)
Parameters
widgetAttributeContextWidgetAttributeContextnamestringvaluestring
AddChild(WidgetTemplate)
public void AddChild(WidgetTemplate child)
Parameters
childWidgetTemplate
AddExtensionData(object)
public void AddExtensionData(object data)
Parameters
dataobject
AddExtensionData(string, object)
public void AddExtensionData(string name, object data)
Parameters
GetAttributesOf<T>()
public IEnumerable<WidgetAttributeTemplate> GetAttributesOf<T>() where T : WidgetAttributeKeyType
Returns
Type Parameters
T
GetAttributesOf<TKey, TValue>()
public IEnumerable<WidgetAttributeTemplate> GetAttributesOf<TKey, TValue>() where TKey : WidgetAttributeKeyType where TValue : WidgetAttributeValueType
Returns
Type Parameters
TKeyTValue
GetChildAt(int)
public WidgetTemplate GetChildAt(int i)
Parameters
iint
Returns
GetExtensionData<T>()
public T GetExtensionData<T>() where T : class
Returns
- T
Type Parameters
T
GetExtensionData<T>(string)
public T GetExtensionData<T>(string name) where T : class
Parameters
namestring
Returns
- T
Type Parameters
T
GetFirstAttributeIfExist<T>()
public WidgetAttributeTemplate GetFirstAttributeIfExist<T>() where T : WidgetAttributeKeyType
Returns
Type Parameters
T
Instantiate(WidgetCreationData, Dictionary<string, WidgetAttributeTemplate>)
public WidgetInstantiationResult Instantiate(WidgetCreationData widgetCreationData, Dictionary<string, WidgetAttributeTemplate> parameters)
Parameters
widgetCreationDataWidgetCreationDataparametersDictionary<string, WidgetAttributeTemplate>
Returns
LoadFrom(PrefabExtensionContext, WidgetAttributeContext, XmlNode)
public static WidgetTemplate LoadFrom(PrefabExtensionContext prefabExtensionContext, WidgetAttributeContext widgetAttributeContext, XmlNode node)
Parameters
prefabExtensionContextPrefabExtensionContextwidgetAttributeContextWidgetAttributeContextnodeXmlNode
Returns
OnRelease()
public void OnRelease()
RemoveAttributeFrom(WidgetAttributeContext, string)
public void RemoveAttributeFrom(WidgetAttributeContext widgetAttributeContext, string fullName)
Parameters
widgetAttributeContextWidgetAttributeContextfullNamestring
RemoveAttributeFrom(WidgetAttributeKeyType, string)
public void RemoveAttributeFrom(WidgetAttributeKeyType keyType, string name)
Parameters
keyTypeWidgetAttributeKeyTypenamestring
RemoveAttributeFrom<T>(string)
public void RemoveAttributeFrom<T>(string name) where T : WidgetAttributeKeyType
Parameters
namestring
Type Parameters
T
RemoveChild(WidgetTemplate)
public void RemoveChild(WidgetTemplate child)
Parameters
childWidgetTemplate
RemoveExtensionData(string)
public void RemoveExtensionData(string name)
Parameters
namestring
RemoveExtensionData<T>()
public void RemoveExtensionData<T>() where T : class
Type Parameters
T
Save(PrefabExtensionContext, XmlNode)
public void Save(PrefabExtensionContext prefabExtensionContext, XmlNode parentNode)
Parameters
prefabExtensionContextPrefabExtensionContextparentNodeXmlNode
SetAttribute(WidgetAttributeTemplate)
public void SetAttribute(WidgetAttributeTemplate attribute)
Parameters
attributeWidgetAttributeTemplate
SetRootTemplate(WidgetPrefab)
public void SetRootTemplate(WidgetPrefab prefab)
Parameters
prefabWidgetPrefab
SwapChildren(WidgetTemplate, WidgetTemplate)
public void SwapChildren(WidgetTemplate child1, WidgetTemplate child2)
Parameters
child1WidgetTemplatechild2WidgetTemplate
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).