6 protected ref DetailsPanelContentPresetConfig m_FallbackContent;
9 protected int m_iMaxDescriptionLenght;
12 protected bool m_bDisplayAdditionalInfo;
14 [
Attribute(
"{8D067F8167DB936D}UI/layouts/Menus/Common/DetailsPanel/Prefabs/AddonTypeImage.layout")]
15 protected ResourceName m_sTypeDisplayLayout;
18 protected int m_iMaxTypeImages;
20 protected const int DESCRIPTION_LENGHT_OFFSET = 10;
23 protected ref array<Widget> m_aTypeImages = {};
26 override void HandlerAttached(Widget w)
28 super.HandlerAttached(w);
31 m_CommonWidgets.m_WarningOverlayComponent.SetWarningVisible(
false,
false);
36 override bool OnUpdate(Widget w)
42 GetGame().GetCallqueue().CallLater(UpdateSize, 0);
48 protected void UpdateSize()
52 m_wRoot.GetScreenSize(sizex, sizey);
53 float sizexUnscaled =
GetGame().GetWorkspace().DPIUnscale(sizex);
64 if (content.m_sTag == contentTag)
73 protected void SetDescriptionText(
string text)
76 if (text.Length() > m_iMaxDescriptionLenght + DESCRIPTION_LENGHT_OFFSET)
78 text = text.Substring(0, m_iMaxDescriptionLenght);
86 protected Widget AddTypeDisplay(
string image, ResourceName imageset, ResourceName glowImageset)
99 comp.SetImage(image, imageset, glowImageset);
105 protected void ClearTypeDisplays()
109 w.RemoveFromHierarchy();
118 class DetailsPanelContentPresetConfig
124 ref array<ref DetailsPanelContentPreset> m_aContent;
134 [
Attribute(
"", UIWidgets.ResourceNamePicker,
"Layout",
"edds")]
135 ResourceName m_sImage;
141 string m_sTitleImageName;
144 ref Color m_sTitleImageColor;
147 string m_sDescription;