Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_PersistentFactionDialog.c
Go to the documentation of this file.
1
class
SCR_PersistentFactionDialog
:
SCR_ConfigurableDialogUi
2
{
3
protected
int
m_iRequestedFactionIndex
;
4
protected
const
string
dialogPresetConfig
=
"{FC62FADA1444750B}Configs/DeployMenu/DeployMenuDialogPreset.conf"
;
5
//protected SCR_ButtonCheckerComponent m_Checker;
6
7
//------------------------------------------------------------------------------------------------
8
static
SCR_PersistentFactionDialog
CreatePersistentFactionDialog
(
int
factionIndex)
9
{
10
SCR_PersistentFactionDialog
dialogUI =
new
SCR_PersistentFactionDialog
();
11
SCR_ConfigurableDialogUi
.
CreateFromPreset
(
dialogPresetConfig
,
"PERSISTENT_FACTION"
, dialogUI);
12
dialogUI.
m_iRequestedFactionIndex
= factionIndex;
13
14
return
dialogUI;
15
}
16
17
//------------------------------------------------------------------------------------------------
18
static
SCR_PersistentFactionDialog
CreatePersistentFactionCampaignFIADialog
(
int
factionIndex)
19
{
20
SCR_PersistentFactionDialog
dialogUI =
new
SCR_PersistentFactionDialog
();
21
SCR_ConfigurableDialogUi
.
CreateFromPreset
(
dialogPresetConfig
,
"PERSISTENT_FACTION_CAMPAIGN_FIA"
, dialogUI);
22
dialogUI.
m_iRequestedFactionIndex
= factionIndex;
23
24
return
dialogUI;
25
}
26
27
int
GetRequestedFactionIndex
()
28
{
29
return
m_iRequestedFactionIndex
;
30
}
31
32
/*
33
todo@lk: uncomment once user settings saving works correctly on ds
34
override void HandlerAttached(Widget w)
35
{
36
super.HandlerAttached(w);
37
38
Widget btn = w.FindAnyWidget("DontShowButton");
39
m_Checker = SCR_ButtonCheckerComponent.Cast(btn.FindHandler(SCR_ButtonCheckerComponent));
40
GetGame().GetInputManager().AddActionListener("MenuDeploy", EActionTrigger.PRESSED, Toggle);
41
}
42
43
override void HandlerDeattached(Widget w)
44
{
45
super.HandlerDeattached(W);
46
47
GetGame().GetInputManager().RemoveActionListener("MenuDeploy", EActionTrigger.PRESSED, Toggle);
48
}
49
50
protected override void OnConfirm()
51
{
52
if (m_Checker.IsToggled())
53
{
54
UserSettings userSettings = GetGame().GetGameUserSettings();
55
if (userSettings)
56
{
57
BaseContainer container = userSettings.GetModule("SCR_DeployMenuSettings");
58
if (container)
59
{
60
container.Set("m_bShowPersistentFactionWarning", false);
61
GetGame().UserSettingsChanged();
62
GetGame().SaveUserSettings();
63
}
64
}
65
}
66
67
super.OnConfirm();
68
}
69
70
protected void Toggle()
71
{
72
m_Checker.SetToggled(!m_Checker.IsToggled());
73
}
74
75
static bool CanCreateDialog()
76
{
77
UserSettings userSettings = GetGame().GetGameUserSettings();
78
if (!userSettings)
79
return false;
80
81
bool showWarning;
82
BaseContainer container = userSettings.GetModule("SCR_DeployMenuSettings");
83
if (container)
84
container.Get("m_bShowPersistentFactionWarning", showWarning);
85
86
return showWarning;
87
}
88
*/
89
};
SCR_ConfigurableDialogUi
Definition
SCR_ConfigurableDialogUI.c:17
SCR_ConfigurableDialogUi::CreateFromPreset
static SCR_ConfigurableDialogUi CreateFromPreset(ResourceName presetsResourceName, string tag, SCR_ConfigurableDialogUi customDialogObj=null)
Creates a dialog from preset.
Definition
SCR_ConfigurableDialogUI.c:94
SCR_PersistentFactionDialog
Definition
SCR_PersistentFactionDialog.c:2
SCR_PersistentFactionDialog::dialogPresetConfig
const string dialogPresetConfig
Definition
SCR_PersistentFactionDialog.c:4
SCR_PersistentFactionDialog::CreatePersistentFactionDialog
static SCR_PersistentFactionDialog CreatePersistentFactionDialog(int factionIndex)
Definition
SCR_PersistentFactionDialog.c:8
SCR_PersistentFactionDialog::m_iRequestedFactionIndex
int m_iRequestedFactionIndex
Definition
SCR_PersistentFactionDialog.c:3
SCR_PersistentFactionDialog::GetRequestedFactionIndex
int GetRequestedFactionIndex()
Definition
SCR_PersistentFactionDialog.c:27
SCR_PersistentFactionDialog::CreatePersistentFactionCampaignFIADialog
static SCR_PersistentFactionDialog CreatePersistentFactionCampaignFIADialog(int factionIndex)
Definition
SCR_PersistentFactionDialog.c:18
scripts
Game
UI
Menu
DeployMenu
SCR_PersistentFactionDialog.c
Generated by
1.17.0