25 protected static const string S_IMAGES_PARENT_WIDGET_NAME =
"Images";
26 protected static const string S_IMAGE_WIDGET_NAME =
"Image";
27 protected static const string S_CAPTION_WIDGET_NAME =
"Caption";
28 protected static const string S_TEXT_WIDGET_NAME =
"Text";
46 super.HandlerAttached(w);
76 void SetImages(array<ref SCR_FieldManual_ImageData> imagesData)
78 if (!imagesData || imagesData.IsEmpty())
94 TextWidget textWidget = TextWidget.Cast(
m_wGallery.FindAnyWidget(S_TEXT_WIDGET_NAME));
118 if (layoutInfo && layoutInfo.m_eType ==
m_eType)
120 galleryInfo = layoutInfo;
125 if (!galleryInfo || galleryInfo.m_sGalleryLayout.IsEmpty() || galleryInfo.m_sImageLayout.IsEmpty())
134 TextWidget textWidget = TextWidget.Cast(
m_wGallery.FindAnyWidget(S_TEXT_WIDGET_NAME));
138 Widget imagesParent =
m_wGallery.FindAnyWidget(S_IMAGES_PARENT_WIDGET_NAME);
151 if (!conditions.Contains(imageData.m_eInputDisplayCondition))
154 image =
GetGame().GetWorkspace().CreateWidgets(galleryInfo.m_sImageLayout, imagesParent);
165 ImageWidget imageWidget = ImageWidget.Cast(
SCR_WidgetHelper.GetWidgetOrChild(widget, S_IMAGE_WIDGET_NAME));
166 if (imageWidget && !imageData.m_Image.IsEmpty())
168 if (imageData.m_sImageName.IsEmpty())
170 imageWidget.LoadImageTexture(0, imageData.m_Image);
174 imageWidget.LoadImageFromSet(0, imageData.m_Image, imageData.m_sImageName);
179 TextWidget captionWidget = TextWidget.Cast(widget.FindAnyWidget(S_CAPTION_WIDGET_NAME));
181 captionWidget.SetText(imageData.m_sCaption);
187 set<SCR_EFieldManual_ImageGalleryType> foundEnums =
new set<SCR_EFieldManual_ImageGalleryType>();
190 foundEnums.Insert(pair.m_eType);
197 info.m_sGalleryLayout =
"{912B608D2650F8B9}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/ICONS_VERTICAL_ImageGallery.layout";
198 info.m_sImageLayout =
"{BF790BE149822E0F}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/ICONS_VERTICAL_Image.layout";
206 info.m_sGalleryLayout =
"{B4DF69D7D553CFBC}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/ICONS_LIST_ImageGallery.layout";
207 info.m_sImageLayout =
"{3194AFE59F1B877E}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/ICONS_LIST_Image.layout";
215 info.m_sGalleryLayout =
"{D8E4A2905F167C53}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/GALLERY_HORIZONTAL_ImageGallery.layout";
216 info.m_sImageLayout =
"{D08B8D5E3209D733}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/GALLERY_HORIZONTAL_Image.layout";
224 info.m_sGalleryLayout =
"{856A53946CA73978}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/GALLERY_VERTICAL_ImageGallery.layout";
225 info.m_sImageLayout =
"{D077D7EA510D2FC5}UI/layouts/Menus/FieldManual/Pieces/ImageGallery/GALLERY_VERTICAL_Image.layout";
238 ResourceName m_sGalleryLayout;
241 ResourceName m_sImageLayout;