Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FieldManualPiece_ImageGallery.c
Go to the documentation of this file.
1[BaseContainerProps(), SCR_BaseContainerStaticTitleField(customTitle: "Images Gallery")]
3{
4 [Attribute(defvalue: SCR_Enum.GetDefault(SCR_EFieldManual_ImageGalleryType.GALLERY_HORIZONTAL), uiwidget: UIWidgets.ComboBox, enums: SCR_Enum.GetList(SCR_EFieldManual_ImageGalleryType))]
6
7 [Attribute()]
8 protected string m_sText;
9
10 [Attribute()]
11 protected ref array<ref SCR_FieldManual_ImageData> m_aImages;
12
13 [Attribute(defvalue: "{68553AA626CD1A40}UI/layouts/Menus/FieldManual/Pieces/FieldManual_Piece_ImageGallery.layout", uiwidget: UIWidgets.EditBoxWithButton, params: "layout")]
15
17
18 //------------------------------------------------------------------------------------------------
19 override void CreateWidget(notnull Widget parent)
20 {
21 WorkspaceWidget workspace = GetGame().GetWorkspace();
22
23 Widget createdWidget = workspace.CreateWidgets(m_Layout, parent);
24 if (!createdWidget)
25 {
26 Print("could not create Image Gallery widget | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.WARNING);
27 return;
28 }
29
32 return;
33
36 GetGame().OnInputDeviceIsGamepadInvoker().Insert(m_ImageGalleryComponent.Rebuild);
37 }
38
39 //------------------------------------------------------------------------------------------------
40 // constructor
42 {
43 if (!m_aImages) // can be config-provided
44 m_aImages = {};
45 }
46
47 //------------------------------------------------------------------------------------------------
48 // destructor
50 {
52 GetGame().OnInputDeviceIsGamepadInvoker().Remove(m_ImageGalleryComponent.Rebuild);
53 }
54}
ArmaReforgerScripted GetGame()
Definition game.c:1398
ScriptInvoker OnInputDeviceIsGamepadInvoker()
Definition game.c:238
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Attribute to manually set a static title.
Definition Attributes.c:11
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute