Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_Tutorial_CombatEngineering_SelectPrefab_1.c
Go to the documentation of this file.
1[EntityEditorProps(insertable: false)]
5
6class SCR_Tutorial_CombatEngineering_SelectPrefab_1 : SCR_BaseTutorialStage
7{
9 protected bool m_bPreviewSelected;
10 protected string m_sSpawnedEntityName = "BUILDING_VEHICLE";
11 //------------------------------------------------------------------------------------------------
12 override protected void Setup()
13 {
14 SCR_PreviewEntityEditorComponent previewEntityComponent = m_TutorialComponent.GetPreviewEntityComponent();
15 if (previewEntityComponent)
16 previewEntityComponent.GetOnPreviewCreate().Insert(OnPreviewCreated);
17
18 GetGame().GetCallqueue().CallLater(DelayedHighlight, 1500, false);
19 }
20
21 //------------------------------------------------------------------------------------------------
22 protected void OnPreviewCreated(SCR_EditablePreviewEntity previewEntity)
23 {
24 m_bPreviewSelected = true;
25 }
26
27 //------------------------------------------------------------------------------------------------
28 protected void DelayedHighlight()
29 {
30 Widget w = GetGame().GetWorkspace().FindAnyWidget("ContentBrowser_AssetCard");
31 m_wHighlight = SCR_WidgetHighlightUIComponent.CreateHighlight(w, "{D574871D2C37B255}UI/layouts/Common/WidgetHighlight.layout");
32 }
33
34 //------------------------------------------------------------------------------------------------
35 override protected bool GetIsFinished()
36 {
37 return m_bPreviewSelected || GetGame().GetWorld().FindEntityByName(m_sSpawnedEntityName);
38 }
39
40 //------------------------------------------------------------------------------------------------
42 {
43 SCR_PreviewEntityEditorComponent previewEntityComponent = m_TutorialComponent.GetPreviewEntityComponent();
44 if (previewEntityComponent)
45 previewEntityComponent.GetOnPreviewCreate().Remove(OnPreviewCreated);
46
47 GetGame().GetCallqueue().Remove(DelayedHighlight);
48 delete m_wHighlight;
49 }
50}
ArmaReforgerScripted GetGame()
Definition game.c:1398
void OnPreviewCreated(SCR_EditablePreviewEntity previewEnt)
Method called when the preview of prefab to build is created.
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void ~SCR_Tutorial_CombatEngineering_SelectPrefab_1()
SCR_Tutorial_CombatEngineering_SelectPrefab_1Class m_wHighlight
SCR_TutorialGamemodeComponent m_TutorialComponent
static Widget CreateHighlight(Widget widget, ResourceName layout, Widget parent=null)