Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PrivacyPolicy.c
Go to the documentation of this file.
2{
3 protected const string POLICY_ROW_LAYOUT = "{AB4838F67BA5293B}Configs/System/PolicyRow.layout";
4 protected const int TABLE_1_ROWS = 20;
5 protected const int TABLE_1_COLUMNS = 3;
6 protected const int TABLE_2_ROWS = 9;
7 protected const int TABLE_2_COLUMNS = 3;
8
9 //------------------------------------------------------------------------------------------------
10 override void OnMenuOpen()
11 {
12 protected Widget footer;
13
14 footer = GetRootWidget().FindAnyWidget("Footer");
15
16 super.OnMenuOpen();
17 // Subscribe to buttons
19 if (back)
21
24 }
25
26 //------------------------------------------------------------------------------------------------
28 protected void UpdateTable(int tableIndex, int columns, int rows)
29 {
30 Widget table = GetRootWidget().FindAnyWidget("PolicyTable" + tableIndex);
31 if (!table)
32 return;
33
34 WorkspaceWidget workspace = GetGame().GetWorkspace();
35 if (!workspace)
36 return;
37
38 Widget tableRow;
39 RichTextWidget rowText;
40 for (int i = 0; i < rows; i++)
41 {
42 tableRow = workspace.CreateWidgets(POLICY_ROW_LAYOUT, table);
43 if (!tableRow)
44 continue;
45
46 for (int j = 0; j < columns; j++)
47 {
48 rowText = RichTextWidget.Cast(tableRow.FindAnyWidget("PolicyColumn" + j));
49 if (!rowText)
50 continue;
51
52 rowText.SetText("#AR-PrivacyPolicy_" + tableIndex + "_" + j + "_" + i);
53 }
54 }
55 }
56
57 //------------------------------------------------------------------------------------------------
59 {
60 GetGame().GetMenuManager().CloseMenuByPreset(ChimeraMenuPreset.PrivacyPolicyMenu)
61 }
62};
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
Widget GetRootWidget()
Constant variables used in various menus.
static SCR_InputButtonComponent GetInputButtonComponent(string name, notnull Widget parent, bool searchAllChildren=true)
const string POLICY_ROW_LAYOUT
void UpdateTable(int tableIndex, int columns, int rows)
override void OnMenuOpen()