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_RoleSelectionMenu.c
Go to the documentation of this file.
1
2
class
SCR_RoleSelectionMenu
:
SCR_DeployMenuBase
3
{
4
protected
SCR_DeployMenuHandler
m_MenuHandler
;
5
6
protected
SCR_FactionRequestUIComponent
m_FactionRequestUIHandler
;
7
protected
SCR_LoadoutRequestUIComponent
m_LoadoutRequestUIHandler
;
8
protected
SCR_GroupRequestUIComponent
m_GroupRequestUIHandler
;
9
10
protected
SCR_FactionManager
m_FactionManager
;
11
protected
SCR_FactionPlayerList
m_FactionPlayerList
;
12
protected
SCR_GroupPlayerList
m_GroupPlayerList
;
13
14
protected
SCR_BaseGameMode
m_GameMode
;
15
protected
SCR_PlayerFactionAffiliationComponent
m_PlyFactionAffilComp
;
16
protected
SCR_PlayerLoadoutComponent
m_PlyLoadoutComp
;
17
18
protected
SCR_InputButtonComponent
m_ContinueButton
;
19
protected
SCR_InputButtonComponent
m_GroupOpenButton
;
20
protected
SCR_InputButtonComponent
m_ViewProfileButton
;
21
22
protected
Widget
m_wPersistentFaction
;
23
protected
TextWidget
m_wScenarioTimeElapsed
;
24
protected
TextWidget
m_wPlayerCount
;
25
protected
TextWidget
m_wServerName
;
26
27
protected
int
m_iMaxPlayerCount
;
28
protected
float
m_fTimer
= 0;
29
30
protected
int
m_iLastFocusedEntryPlayerId
;
31
32
//------------------------------------------------------------------------------------------------
33
override
void
OnMenuOpen
()
34
{
35
super.OnMenuOpen();
36
37
m_MapEntity
=
SCR_MapEntity
.
GetMapInstance
();
38
m_FactionManager
=
SCR_FactionManager
.Cast(
GetGame
().GetFactionManager());
39
m_GameMode
=
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
40
m_MenuHandler
=
SCR_DeployMenuHandler
.Cast(
GetRootWidget
().FindHandler(
SCR_DeployMenuHandler
));
41
42
m_wPersistentFaction
=
GetRootWidget
().FindAnyWidget(
"PermanentFaction"
);
43
if
(
m_wPersistentFaction
)
44
m_wPersistentFaction
.SetVisible(!SCR_RespawnSystemComponent.GetInstance().IsFactionChangeAllowed());
45
46
m_wScenarioTimeElapsed
=
TextWidget
.Cast(
GetRootWidget
().FindAnyWidget(
"TimeElapsed"
));
47
m_wServerName
=
TextWidget
.Cast(
GetRootWidget
().FindAnyWidget(
"ServerName"
));
48
if
(
m_wServerName
)
49
{
50
SCR_MissionHeader
header =
SCR_MissionHeader
.Cast(
GetGame
().GetMissionHeader());
51
if
(header)
52
m_wServerName
.SetText(header.m_sName);
53
}
54
55
ServerInfo
serverInfo =
GetGame
().GetServerInfo();
56
if
(serverInfo)
57
m_iMaxPlayerCount
= serverInfo.GetPlayerLimit();
58
59
if
(!
m_MenuHandler
)
60
{
61
Print
(
"SCR_DeployMenuHandler is missing on root widget of "
+
this
,
LogLevel
.ERROR);
62
return
;
63
}
64
65
PlayerController pc =
GetGame
().GetPlayerController();
66
m_PlyFactionAffilComp
=
SCR_PlayerFactionAffiliationComponent
.Cast(pc.FindComponent(
SCR_PlayerFactionAffiliationComponent
));
67
if
(!
m_PlyFactionAffilComp
)
68
{
69
Print
(
"Cannot find player faction affiliation component!"
,
LogLevel
.ERROR);
70
}
71
72
m_PlyLoadoutComp
=
SCR_PlayerLoadoutComponent
.Cast(pc.FindComponent(
SCR_PlayerLoadoutComponent
));
73
if
(!
m_PlyLoadoutComp
)
74
{
75
Print
(
"Cannot find player loadout component!"
,
LogLevel
.ERROR);
76
}
77
78
m_wPlayerCount
=
TextWidget
.Cast(
GetRootWidget
().FindAnyWidget(
"PlayerCount"
));
79
m_FactionPlayerList
=
m_MenuHandler
.GetFactionPlayerList();
80
81
UpdateElapsedTime
();
82
UpdatePlayerCount
();
83
84
FindRequestHandlers
();
85
HookEvents
();
86
87
m_ContinueButton
=
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"CloseButton"
,
GetRootWidget
());
88
if
(
m_ContinueButton
)
89
{
90
m_ContinueButton
.m_OnActivated.Insert(Close);
91
m_ContinueButton
.SetEnabled(
CanContinue
());
92
}
93
94
m_GroupOpenButton
=
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"GroupMenu"
,
GetRootWidget
());
95
if
(
m_GroupOpenButton
)
96
{
97
m_GroupOpenButton
.m_OnActivated.Insert(
OpenGroupMenu
);
98
m_GroupOpenButton
.SetEnabled(
CanOpenGroupMenu
());
99
}
100
101
m_ViewProfileButton
=
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"ViewProfile"
,
GetRootWidget
());
102
if
(
m_ViewProfileButton
)
103
{
104
UpdateViewProfileButton
(
true
);
105
m_ViewProfileButton
.m_OnActivated.Insert(
OnViewProfile
);
106
}
107
108
Widget
chat =
GetRootWidget
().FindAnyWidget(
"ChatPanel"
);
109
if
(chat)
110
m_ChatPanel
=
SCR_ChatPanel
.Cast(chat.FindHandler(
SCR_ChatPanel
));
111
112
m_ChatButton
=
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"ChatButton"
,
GetRootWidget
());
113
if
(
m_ChatButton
)
114
m_ChatButton
.m_OnActivated.Insert(
OnChatToggle
);
115
116
m_PauseButton
=
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"PauseButton"
,
GetRootWidget
());
117
if
(
m_PauseButton
)
118
m_PauseButton
.m_OnActivated.Insert(
OnPauseMenu
);
119
InitMapPlain
();
120
121
SCR_BaseGameMode
gameMode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
122
gameMode.
PauseGame
(
true
,
SCR_EPauseReason
.MENU);
123
}
124
125
//------------------------------------------------------------------------------------------------
126
override
void
OnMenuOpened
()
127
{
128
super.OnMenuOpened();
129
130
if
(
m_FactionRequestUIHandler
)
131
{
132
SCR_FactionButton
btn =
m_FactionRequestUIHandler
.GetFirstValidFactionButton();
133
if
(btn)
134
btn.SetFocused();
135
else
136
ShowFactionPlayerList
(show:
false
);
137
}
138
}
139
140
//------------------------------------------------------------------------------------------------
141
override
void
OnMenuUpdate
(
float
tDelta)
142
{
143
super.OnMenuUpdate(tDelta);
144
145
GetGame
().GetInputManager().ActivateContext(
"DeployMenuContext"
);
146
147
if
(
m_ChatPanel
)
148
m_ChatPanel
.OnUpdateChat(tDelta);
149
150
m_fTimer
-= tDelta;
151
if
(
m_fTimer
< 0)
152
UpdateElapsedTime
();
153
}
154
155
//------------------------------------------------------------------------------------------------
156
override
void
OnMenuFocusGained
()
157
{
158
SCR_EditorManagerEntity
editorManager =
SCR_EditorManagerEntity
.GetInstance();
159
if
(editorManager)
160
editorManager.AutoInit();
161
162
GetGame
().GetInputManager().AddActionListener(
"ShowScoreboard"
,
EActionTrigger
.DOWN,
OpenPlayerList
);
163
164
super.OnMenuFocusGained();
165
}
166
167
//------------------------------------------------------------------------------------------------
168
override
void
OnMenuFocusLost
()
169
{
170
GetGame
().GetInputManager().RemoveActionListener(
"ShowScoreboard"
,
EActionTrigger
.DOWN,
OpenPlayerList
);
171
172
super.OnMenuFocusLost();
173
}
174
175
//------------------------------------------------------------------------------------------------
177
protected
void
FindRequestHandlers
()
178
{
179
m_FactionRequestUIHandler
=
m_MenuHandler
.GetFactionRequestHandler();
180
m_LoadoutRequestUIHandler
=
m_MenuHandler
.GetLoadoutRequestHandler();
181
m_GroupRequestUIHandler
=
m_MenuHandler
.GetGroupRequestHandler();
182
}
183
184
//------------------------------------------------------------------------------------------------
186
protected
void
HookEvents
()
187
{
188
m_PlyFactionAffilComp
.GetOnPlayerFactionRequestInvoker_O().Insert(
OnPlayerFactionRequest
);
189
m_PlyFactionAffilComp
.GetOnPlayerFactionResponseInvoker_O().Insert(
OnPlayerFactionResponse
);
190
191
m_PlyLoadoutComp
.GetOnPlayerLoadoutRequestInvoker_O().Insert(
OnPlayerLoadoutRequest
);
192
m_PlyLoadoutComp
.GetOnPlayerLoadoutResponseInvoker_O().Insert(
OnPlayerLoadoutResponse
);
193
194
m_FactionRequestUIHandler
.GetOnButtonFocused().Insert(
ShowFactionPlayerList
);
195
m_FactionRequestUIHandler
.GetOnFactionRequested().Insert(
OnPlayerFactionResponse
);
196
197
m_LoadoutRequestUIHandler
.GetOnButtonFocused().Insert(
ShowLoadoutList
);
198
m_LoadoutRequestUIHandler
.GetOnMouseLeft().Insert(
OnMouseLeft
);
199
m_LoadoutRequestUIHandler
.GetOnPlayerEntryFocused().Insert(
OnPlayerEntryFocused
);
200
m_LoadoutRequestUIHandler
.GetOnPlayerEntryFocusLost().Insert(
OnPlayerEntryFocusLost
);
201
202
m_GroupRequestUIHandler
.GetOnMouseLeft().Insert(
OnMouseLeft
);
203
m_GroupRequestUIHandler
.GetOnButtonFocused().Insert(
ShowLoadoutList
);
204
205
m_GroupRequestUIHandler
.GetOnPlayerGroupJoined().Insert(
OnPlayerGroupJoined
);
206
m_GroupRequestUIHandler
.GetOnLocalPlayerGroupJoined().Insert(
OnLocalGroupJoined
);
207
}
208
209
//------------------------------------------------------------------------------------------------
211
protected
void
UpdateElapsedTime
()
212
{
213
m_fTimer
= 1;
214
string
timeElapsed =
SCR_FormatHelper
.FormatTime(
m_GameMode
.GetElapsedTime());
215
216
if
(
m_wScenarioTimeElapsed
)
217
m_wScenarioTimeElapsed
.SetText(timeElapsed);
218
219
UpdatePlayerCount
();
220
}
221
222
//------------------------------------------------------------------------------------------------
224
protected
void
InitMapPlain
()
225
{
226
const
ResourceName
conf
=
"{A786DD4868598F15}Configs/Map/MapPlain.conf"
;
// TODO: check for good const usage
227
m_MapEntity
.OpenMap(
m_MapEntity
.SetupMapConfig(
EMapEntityMode
.PLAIN,
conf
, GetRootWidget()));
228
}
229
230
//------------------------------------------------------------------------------------------------
233
protected
void
OnMouseLeft
()
234
{
235
bool
hasFaction = (
m_PlyFactionAffilComp
.GetAffiliatedFaction() != null);
236
bool
hasGroup =
true
;
237
238
if
(!hasFaction)
239
{
240
SCR_FactionButton
btn =
m_FactionRequestUIHandler
.GetFirstValidFactionButton();
241
ShowFactionPlayerList
(btn.
GetFaction
());
242
return
;
243
}
244
245
ShowLoadoutList
();
246
}
247
248
//------------------------------------------------------------------------------------------------
252
protected
void
ShowFactionPlayerList
(
Faction
faction = null,
bool
show =
true
)
253
{
254
if
(
m_FactionPlayerList
)
255
{
256
m_FactionPlayerList
.SetFaction(faction);
257
m_FactionPlayerList
.ShowPlayerList(show && faction != null);
258
}
259
260
m_LoadoutRequestUIHandler
.ShowLoadoutSelector(
false
);
261
}
262
263
//------------------------------------------------------------------------------------------------
265
protected
void
ShowLoadoutList
()
266
{
267
SCR_PlayerControllerGroupComponent plyGroupComp = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
268
if
(!plyGroupComp)
269
return
;
270
271
// can show after the player is added to the group
272
if
(plyGroupComp.GetGroupID() < 0)
273
return
;
274
275
if
(
m_FactionPlayerList
)
276
m_FactionPlayerList
.ShowPlayerList(
false
);
277
278
m_LoadoutRequestUIHandler
.ShowLoadoutSelector(
true
);
279
}
280
281
//------------------------------------------------------------------------------------------------
283
protected
void
ShowGroupPlayerList
()
284
{
285
if
(
m_FactionPlayerList
)
286
m_FactionPlayerList
.ShowPlayerList(
false
);
287
288
m_LoadoutRequestUIHandler
.ShowLoadoutSelector(
false
);
289
}
290
291
//------------------------------------------------------------------------------------------------
293
protected
void
UpdatePlayerCount
()
294
{
295
if
(
m_iMaxPlayerCount
> 0)
296
m_wPlayerCount
.SetTextFormat(
"%1/%2"
,
GetGame
().GetPlayerManager().
GetPlayerCount
().
ToString
(),
m_iMaxPlayerCount
);
297
else
298
m_wPlayerCount
.SetText(
GetGame
().GetPlayerManager().
GetPlayerCount
().
ToString
());
299
}
300
301
//------------------------------------------------------------------------------------------------
303
protected
bool
CanContinue
()
304
{
305
if
(!
m_PlyFactionAffilComp
|| !
m_PlyLoadoutComp
)
306
return
false
;
307
308
bool
canContinue =
m_PlyFactionAffilComp
.GetAffiliatedFaction() &&
m_PlyLoadoutComp
.GetLoadout();
309
if
(
m_GroupRequestUIHandler
&&
m_GroupRequestUIHandler
.IsEnabled())
310
{
311
canContinue = canContinue && (
m_GroupRequestUIHandler
.GetPlayerGroup() != null);
312
}
313
314
return
canContinue;
315
}
316
317
//------------------------------------------------------------------------------------------------
319
protected
bool
CanOpenGroupMenu
()
320
{
321
return
m_PlyFactionAffilComp
&&
m_PlyFactionAffilComp
.GetAffiliatedFaction();
322
}
323
324
//------------------------------------------------------------------------------------------------
325
protected
void
OpenGroupMenu
()
326
{
327
SCR_GroupsManagerComponent
groupManager =
SCR_GroupsManagerComponent
.GetInstance();
328
if
(!groupManager || !groupManager.IsGroupMenuAllowed())
329
return
;
330
331
GetGame
().GetMenuManager().OpenDialog(
ChimeraMenuPreset
.GroupMenu);
332
}
333
334
//------------------------------------------------------------------------------------------------
335
protected
void
OnPlayerFactionRequest
(
SCR_PlayerFactionAffiliationComponent
component,
int
factionIndex)
336
{
337
}
338
339
//------------------------------------------------------------------------------------------------
341
protected
void
OnPlayerFactionResponse
(
SCR_PlayerFactionAffiliationComponent
component,
int
factionIndex,
bool
response)
342
{
343
if
(response)
344
{
345
m_FactionRequestUIHandler
.OnPlayerFactionAssigned(component.GetAffiliatedFaction());
346
if
(factionIndex == -1)
347
{
348
m_GroupRequestUIHandler
.SetExpanded(
false
);
349
m_FactionRequestUIHandler
.SetExpanded(
false
);
350
}
351
else
352
{
353
// If groups are enabled, update them first, otherwise just show players assigned to the faction
354
if
(
m_GroupRequestUIHandler
&&
m_GroupRequestUIHandler
.IsEnabled())
355
{
356
Widget
list =
m_FactionRequestUIHandler
.GetFactionButton(factionIndex).GetList();
357
m_GroupRequestUIHandler
.SetListWidget(list);
358
m_GroupRequestUIHandler
.ShowAvailableGroups(component.GetAffiliatedFaction());
359
m_LoadoutRequestUIHandler
.ShowAvailableLoadouts(component.GetAffiliatedFaction());
360
}
361
else
362
{
363
Widget
list =
m_FactionRequestUIHandler
.GetFactionButton(factionIndex).GetGridList();
364
m_LoadoutRequestUIHandler
.SetListWidget(list);
365
m_LoadoutRequestUIHandler
.ShowAvailableLoadouts(component.GetAffiliatedFaction());
366
367
array<int> players = {};
368
GetGame
().GetPlayerManager().GetPlayers(players);
369
foreach
(
int
pid : players)
370
{
371
if
(
SCR_Faction
.Cast(
SCR_FactionManager
.SGetPlayerFaction(pid)) != component.GetAffiliatedFaction())
372
players.RemoveItem(pid);
373
}
374
375
m_LoadoutRequestUIHandler
.ShowPlayerLoadouts(players);
376
}
377
}
378
379
m_GroupOpenButton
.SetEnabled(
CanOpenGroupMenu
());
380
m_ContinueButton
.SetEnabled(
CanContinue
());
381
if
(
m_wPersistentFaction
)
382
m_wPersistentFaction
.SetVisible(
false
);
383
}
384
385
m_FactionRequestUIHandler
.Unlock();
386
}
387
388
//------------------------------------------------------------------------------------------------
390
protected
void
OnPlayerGroupJoined
(
SCR_AIGroup
group,
int
pid = -1)
391
{
392
if
(!group || group.
GetGroupID
() !=
m_GroupRequestUIHandler
.GetShownGroupId())
393
return
;
394
395
SCR_GroupButton
groupBtn =
m_GroupRequestUIHandler
.GetGroupButton(group);
396
if
(!groupBtn)
397
return
;
398
399
Widget
list =
m_GroupRequestUIHandler
.GetGroupButton(group).GetList();
400
array<int> players = group.
GetPlayerIDs
();
401
402
m_LoadoutRequestUIHandler
.SetListWidget(list);
403
m_LoadoutRequestUIHandler
.ShowPlayerLoadouts(players, group);
404
}
405
406
//------------------------------------------------------------------------------------------------
408
protected
void
OnLocalGroupJoined
(
SCR_AIGroup
group)
409
{
410
if
(!group)
411
{
412
m_LoadoutRequestUIHandler
.SetListVisible(
false
);
413
return
;
414
}
415
416
OnPlayerGroupJoined
(group);
417
418
m_ContinueButton
.SetEnabled(
CanContinue
());
419
420
m_LoadoutRequestUIHandler
.ShowAvailableLoadouts(group.
GetFaction
());
421
422
ShowLoadoutList
();
423
}
424
425
//------------------------------------------------------------------------------------------------
426
protected
void
OnPlayerLoadoutRequest
(
SCR_PlayerLoadoutComponent
component,
int
loadoutIndex)
427
{
428
}
429
430
//------------------------------------------------------------------------------------------------
432
protected
void
OnPlayerLoadoutResponse
(
SCR_PlayerLoadoutComponent
component,
int
loadoutIndex,
bool
response)
433
{
434
if
(response)
435
{
436
m_LoadoutRequestUIHandler
.OnPlayerLoadoutAssigned(component);
437
m_LoadoutRequestUIHandler
.SetSelected(component);
438
m_LoadoutRequestUIHandler
.RefreshLoadoutPreview();
439
}
440
441
m_ContinueButton
.SetEnabled(
CanContinue
());
442
m_LoadoutRequestUIHandler
.Unlock();
443
}
444
445
//------------------------------------------------------------------------------------------------
446
protected
void
OnChatToggle
()
447
{
448
if
(!
m_ChatPanel
)
449
{
450
Widget
chat =
GetRootWidget
().FindAnyWidget(
"ChatPanel"
);
451
if
(chat)
452
m_ChatPanel
=
SCR_ChatPanel
.Cast(chat.FindHandler(
SCR_ChatPanel
));
453
}
454
455
if
(!
m_ChatPanel
||
m_ChatPanel
.IsOpen())
456
return
;
457
458
SCR_ChatPanelManager
.
GetInstance
().
ToggleChatPanel
(
m_ChatPanel
);
459
}
460
461
//------------------------------------------------------------------------------------------------
462
protected
void
OnPauseMenu
()
463
{
464
UpdateViewProfileButton
(
true
);
465
466
MenuBase
menu =
GetGame
().GetMenuManager().OpenMenu(
ChimeraMenuPreset
.PauseMenu, 0,
true
,
false
);
467
468
PauseMenuUI
pauseMenu =
PauseMenuUI
.Cast(menu);
469
if
(pauseMenu)
470
{
471
pauseMenu.FadeBackground(
true
,
true
);
472
pauseMenu.DisableSettings();
473
}
474
}
475
476
//------------------------------------------------------------------------------------------------
477
override
void
OnMenuClose
()
478
{
479
super.OnMenuClose();
480
481
if
(
m_MapEntity
&&
m_MapEntity
.IsOpen())
482
m_MapEntity
.CloseMap();
483
484
SCR_BaseGameMode
gameMode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
485
if
(gameMode)
486
gameMode.
PauseGame
(
false
,
SCR_EPauseReason
.MENU);
487
}
488
489
//------------------------------------------------------------------------------------------------
490
protected
void
OnPlayerEntryFocused
(
int
id
)
491
{
492
m_iLastFocusedEntryPlayerId
=
id
;
493
UpdateViewProfileButton
();
494
}
495
496
//------------------------------------------------------------------------------------------------
497
protected
void
OnPlayerEntryFocusLost
(
Widget
w)
498
{
499
UpdateViewProfileButton
(
true
);
500
}
501
502
//------------------------------------------------------------------------------------------------
503
protected
void
OnViewProfile
()
504
{
505
GetGame
().GetPlayerManager().ShowUserProfile(
m_iLastFocusedEntryPlayerId
);
506
}
507
508
//------------------------------------------------------------------------------------------------
509
protected
void
UpdateViewProfileButton
(
bool
forceHidden =
false
)
510
{
511
if
(!
m_ViewProfileButton
)
512
return
;
513
514
m_ViewProfileButton
.SetVisible(!forceHidden &&
GetGame
().GetPlayerManager().IsUserProfileAvailable(
m_iLastFocusedEntryPlayerId
),
false
);
515
}
516
517
//------------------------------------------------------------------------------------------------
522
static
SCR_RoleSelectionMenu
OpenRoleSelectionMenu
()
523
{
524
if
(!
GetRoleSelectionMenu
())
525
GetGame
().GetMenuManager().OpenMenu(
ChimeraMenuPreset
.RoleSelectionDialog);
526
527
return
GetRoleSelectionMenu
();
528
}
529
530
//------------------------------------------------------------------------------------------------
532
static
void
CloseRoleSelectionMenu
()
533
{
534
GetGame
().GetMenuManager().CloseMenuByPreset(
ChimeraMenuPreset
.RoleSelectionDialog);
535
}
536
537
//------------------------------------------------------------------------------------------------
542
static
SCR_RoleSelectionMenu
GetRoleSelectionMenu
()
543
{
544
return
SCR_RoleSelectionMenu
.Cast(
GetGame
().GetMenuManager().FindMenuByPreset(
ChimeraMenuPreset
.RoleSelectionDialog));
545
}
546
};
id
AddonBuildInfoTool id
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition
ChimeraMenuBase.c:4
SCR_EPauseReason
SCR_EPauseReason
Definition
EPauseReason.c:2
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
SCR_EditorManagerEntity
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Definition
SCR_EditorManagerEntity.c:2211
GetPlayerCount
int GetPlayerCount()
Definition
SCR_Faction.c:554
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition
SCR_FactionManager.c:498
SCR_GroupsManagerComponent
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_GroupsManagerComponent.c:1747
EMapEntityMode
EMapEntityMode
Mode of the map.
Definition
SCR_MapConstants.c:29
GetRootWidget
Widget GetRootWidget()
Definition
SCR_ModularButtonComponent.c:189
conf
Configs ServerBrowser KickDialogs conf
Definition
SCR_NotificationSenderComponent.c:29
Faction
Definition
Faction.c:13
MenuBase
Definition
MenuBase.c:32
PauseMenuUI
Definition
SCR_PauseMenuUI.c:3
ResourceName
Definition
ResourceName.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetPlayerIDs
array< int > GetPlayerIDs()
Definition
SCR_AIGroup.c:978
SCR_AIGroup::GetGroupID
int GetGroupID()
Definition
SCR_AIGroup.c:935
SCR_AIGroup::GetFaction
Faction GetFaction()
Definition
SCR_AIGroup.c:2156
SCR_BaseGameMode
Definition
SCR_BaseGameMode.c:139
SCR_BaseGameMode::PauseGame
bool PauseGame(bool pause, SCR_EPauseReason reason=SCR_EPauseReason.SYSTEM)
Definition
SCR_BaseGameMode.c:2025
SCR_ChatPanel
Definition
SCR_ChatPanel.c:7
SCR_ChatPanelManager
Definition
SCR_ChatPanelManager.c:13
SCR_ChatPanelManager::GetInstance
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
Definition
SCR_ChatPanelManager.c:127
SCR_ChatPanelManager::ToggleChatPanel
void ToggleChatPanel(notnull SCR_ChatPanel panel)
Toggles the chat panel: opens if it's closed, closes if it's open.
Definition
SCR_ChatPanelManager.c:65
SCR_DeployMenuBase
Base deploy menu class.
Definition
SCR_DeployMenuBase.c:7
SCR_DeployMenuBase::m_ChatButton
SCR_InputButtonComponent m_ChatButton
Definition
SCR_DeployMenuBase.c:10
SCR_DeployMenuBase::m_PauseButton
SCR_InputButtonComponent m_PauseButton
Definition
SCR_DeployMenuBase.c:8
SCR_DeployMenuBase::m_MapEntity
SCR_MapEntity m_MapEntity
Definition
SCR_DeployMenuBase.c:13
SCR_DeployMenuBase::OpenPlayerList
void OpenPlayerList()
Definition
SCR_DeployMenuBase.c:67
SCR_DeployMenuBase::m_ChatPanel
SCR_ChatPanel m_ChatPanel
Definition
SCR_DeployMenuBase.c:12
SCR_DeployMenuHandler
Definition
SCR_DeployMenuHandler.c:7
SCR_FactionButton
Definition
SCR_FactionRequestUIComponent.c:293
SCR_FactionButton::GetFaction
SCR_Faction GetFaction()
Get this button's faction.
Definition
SCR_FactionRequestUIComponent.c:339
SCR_Faction
Definition
SCR_Faction.c:6
SCR_FactionPlayerList
Definition
SCR_FactionPlayerList.c:63
SCR_FactionRequestUIComponent
Definition
SCR_FactionRequestUIComponent.c:6
SCR_FormatHelper
Definition
SCR_FormatHelper.c:2
SCR_GroupButton
Component attached to the group button.
Definition
SCR_GroupRequestUIComponent.c:581
SCR_GroupPlayerList
Definition
SCR_FactionPlayerList.c:245
SCR_GroupRequestUIComponent
Component responsible for handling group requests and visualization in deploy menu.
Definition
SCR_GroupRequestUIComponent.c:4
SCR_InputButtonComponent
Definition
SCR_InputButtonComponent.c:2
SCR_InputButtonComponent::GetInputButtonComponent
static SCR_InputButtonComponent GetInputButtonComponent(string name, notnull Widget parent, bool searchAllChildren=true)
Definition
SCR_InputButtonComponent.c:1212
SCR_LoadoutRequestUIComponent
Component responsible for requesting and visualization of available loadouts in deploy menu.
Definition
SCR_LoadoutRequestUIComponent.c:15
SCR_MapEntity
Definition
SCR_MapEntity.c:18
SCR_MapEntity::GetMapInstance
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition
SCR_MapEntity.c:112
SCR_MissionHeader
Definition
SCR_MissionHeader.c:2
SCR_PlayerFactionAffiliationComponent
Definition
SCR_PlayerFactionAffiliationComponent.c:21
SCR_PlayerLoadoutComponent
Definition
SCR_PlayerLoadoutComponent.c:17
SCR_RoleSelectionMenu
Role selection menu for setting up player faction, group and loadout.
Definition
SCR_RoleSelectionMenu.c:3
SCR_RoleSelectionMenu::m_ViewProfileButton
SCR_InputButtonComponent m_ViewProfileButton
Definition
SCR_RoleSelectionMenu.c:20
SCR_RoleSelectionMenu::m_FactionPlayerList
SCR_FactionPlayerList m_FactionPlayerList
Definition
SCR_RoleSelectionMenu.c:11
SCR_RoleSelectionMenu::UpdatePlayerCount
void UpdatePlayerCount()
Updates the session's player count.
Definition
SCR_RoleSelectionMenu.c:293
SCR_RoleSelectionMenu::m_LoadoutRequestUIHandler
SCR_LoadoutRequestUIComponent m_LoadoutRequestUIHandler
Definition
SCR_RoleSelectionMenu.c:7
SCR_RoleSelectionMenu::m_GroupRequestUIHandler
SCR_GroupRequestUIComponent m_GroupRequestUIHandler
Definition
SCR_RoleSelectionMenu.c:8
SCR_RoleSelectionMenu::UpdateElapsedTime
void UpdateElapsedTime()
Update elapsed time.
Definition
SCR_RoleSelectionMenu.c:211
SCR_RoleSelectionMenu::m_GameMode
SCR_BaseGameMode m_GameMode
Definition
SCR_RoleSelectionMenu.c:14
SCR_RoleSelectionMenu::m_MenuHandler
SCR_DeployMenuHandler m_MenuHandler
Definition
SCR_RoleSelectionMenu.c:4
SCR_RoleSelectionMenu::ShowGroupPlayerList
void ShowGroupPlayerList()
Shows the Player List selector on the right side of role selection screen.
Definition
SCR_RoleSelectionMenu.c:283
SCR_RoleSelectionMenu::m_iLastFocusedEntryPlayerId
int m_iLastFocusedEntryPlayerId
Definition
SCR_RoleSelectionMenu.c:30
SCR_RoleSelectionMenu::m_FactionManager
SCR_FactionManager m_FactionManager
Definition
SCR_RoleSelectionMenu.c:10
SCR_RoleSelectionMenu::m_PlyLoadoutComp
SCR_PlayerLoadoutComponent m_PlyLoadoutComp
Definition
SCR_RoleSelectionMenu.c:16
SCR_RoleSelectionMenu::CanOpenGroupMenu
bool CanOpenGroupMenu()
Check if group menu can be opened.
Definition
SCR_RoleSelectionMenu.c:319
SCR_RoleSelectionMenu::m_ContinueButton
SCR_InputButtonComponent m_ContinueButton
Definition
SCR_RoleSelectionMenu.c:18
SCR_RoleSelectionMenu::m_wServerName
TextWidget m_wServerName
Definition
SCR_RoleSelectionMenu.c:25
SCR_RoleSelectionMenu::CloseRoleSelectionMenu
static void CloseRoleSelectionMenu()
Close role selection menu.
Definition
SCR_RoleSelectionMenu.c:532
SCR_RoleSelectionMenu::m_fTimer
float m_fTimer
Definition
SCR_RoleSelectionMenu.c:28
SCR_RoleSelectionMenu::GetRoleSelectionMenu
static SCR_RoleSelectionMenu GetRoleSelectionMenu()
Definition
SCR_RoleSelectionMenu.c:542
SCR_RoleSelectionMenu::OnMenuFocusLost
override void OnMenuFocusLost()
Definition
SCR_RoleSelectionMenu.c:168
SCR_RoleSelectionMenu::m_GroupOpenButton
SCR_InputButtonComponent m_GroupOpenButton
Definition
SCR_RoleSelectionMenu.c:19
SCR_RoleSelectionMenu::OnPlayerEntryFocused
void OnPlayerEntryFocused(int id)
Definition
SCR_RoleSelectionMenu.c:490
SCR_RoleSelectionMenu::m_wPlayerCount
TextWidget m_wPlayerCount
Definition
SCR_RoleSelectionMenu.c:24
SCR_RoleSelectionMenu::OnChatToggle
void OnChatToggle()
Definition
SCR_RoleSelectionMenu.c:446
SCR_RoleSelectionMenu::OnPlayerLoadoutRequest
void OnPlayerLoadoutRequest(SCR_PlayerLoadoutComponent component, int loadoutIndex)
Definition
SCR_RoleSelectionMenu.c:426
SCR_RoleSelectionMenu::OnPlayerGroupJoined
void OnPlayerGroupJoined(SCR_AIGroup group, int pid=-1)
Callback when a player joins a group.
Definition
SCR_RoleSelectionMenu.c:390
SCR_RoleSelectionMenu::OnPlayerEntryFocusLost
void OnPlayerEntryFocusLost(Widget w)
Definition
SCR_RoleSelectionMenu.c:497
SCR_RoleSelectionMenu::OnMouseLeft
void OnMouseLeft()
Definition
SCR_RoleSelectionMenu.c:233
SCR_RoleSelectionMenu::HookEvents
void HookEvents()
Initialize event listeners.
Definition
SCR_RoleSelectionMenu.c:186
SCR_RoleSelectionMenu::OnPlayerLoadoutResponse
void OnPlayerLoadoutResponse(SCR_PlayerLoadoutComponent component, int loadoutIndex, bool response)
Callback when local player receives a response to a loadout request.
Definition
SCR_RoleSelectionMenu.c:432
SCR_RoleSelectionMenu::m_FactionRequestUIHandler
SCR_FactionRequestUIComponent m_FactionRequestUIHandler
Definition
SCR_RoleSelectionMenu.c:6
SCR_RoleSelectionMenu::m_iMaxPlayerCount
int m_iMaxPlayerCount
Definition
SCR_RoleSelectionMenu.c:27
SCR_RoleSelectionMenu::ShowLoadoutList
void ShowLoadoutList()
Shows the loadout selector on the right side of role selection screen.
Definition
SCR_RoleSelectionMenu.c:265
SCR_RoleSelectionMenu::OnPlayerFactionResponse
void OnPlayerFactionResponse(SCR_PlayerFactionAffiliationComponent component, int factionIndex, bool response)
Callback when player receives a response to afaction request.
Definition
SCR_RoleSelectionMenu.c:341
SCR_RoleSelectionMenu::ShowFactionPlayerList
void ShowFactionPlayerList(Faction faction=null, bool show=true)
Definition
SCR_RoleSelectionMenu.c:252
SCR_RoleSelectionMenu::m_wScenarioTimeElapsed
TextWidget m_wScenarioTimeElapsed
Definition
SCR_RoleSelectionMenu.c:23
SCR_RoleSelectionMenu::OnViewProfile
void OnViewProfile()
Definition
SCR_RoleSelectionMenu.c:503
SCR_RoleSelectionMenu::OnMenuFocusGained
override void OnMenuFocusGained()
Definition
SCR_RoleSelectionMenu.c:156
SCR_RoleSelectionMenu::OnMenuOpen
override void OnMenuOpen()
Definition
SCR_RoleSelectionMenu.c:33
SCR_RoleSelectionMenu::OpenRoleSelectionMenu
static SCR_RoleSelectionMenu OpenRoleSelectionMenu()
Definition
SCR_RoleSelectionMenu.c:522
SCR_RoleSelectionMenu::OnPauseMenu
void OnPauseMenu()
Definition
SCR_RoleSelectionMenu.c:462
SCR_RoleSelectionMenu::OnMenuOpened
override void OnMenuOpened()
Definition
SCR_RoleSelectionMenu.c:126
SCR_RoleSelectionMenu::m_wPersistentFaction
Widget m_wPersistentFaction
Definition
SCR_RoleSelectionMenu.c:22
SCR_RoleSelectionMenu::InitMapPlain
void InitMapPlain()
Initialize empty map in the background.
Definition
SCR_RoleSelectionMenu.c:224
SCR_RoleSelectionMenu::OnLocalGroupJoined
void OnLocalGroupJoined(SCR_AIGroup group)
Callback when local player joins a group.
Definition
SCR_RoleSelectionMenu.c:408
SCR_RoleSelectionMenu::OpenGroupMenu
void OpenGroupMenu()
Definition
SCR_RoleSelectionMenu.c:325
SCR_RoleSelectionMenu::OnMenuUpdate
override void OnMenuUpdate(float tDelta)
Definition
SCR_RoleSelectionMenu.c:141
SCR_RoleSelectionMenu::FindRequestHandlers
void FindRequestHandlers()
Find request handlers based on the layout configuration.
Definition
SCR_RoleSelectionMenu.c:177
SCR_RoleSelectionMenu::UpdateViewProfileButton
void UpdateViewProfileButton(bool forceHidden=false)
Definition
SCR_RoleSelectionMenu.c:509
SCR_RoleSelectionMenu::OnMenuClose
override void OnMenuClose()
Definition
SCR_RoleSelectionMenu.c:477
SCR_RoleSelectionMenu::m_PlyFactionAffilComp
SCR_PlayerFactionAffiliationComponent m_PlyFactionAffilComp
Definition
SCR_RoleSelectionMenu.c:15
SCR_RoleSelectionMenu::OnPlayerFactionRequest
void OnPlayerFactionRequest(SCR_PlayerFactionAffiliationComponent component, int factionIndex)
Definition
SCR_RoleSelectionMenu.c:335
SCR_RoleSelectionMenu::m_GroupPlayerList
SCR_GroupPlayerList m_GroupPlayerList
Definition
SCR_RoleSelectionMenu.c:12
SCR_RoleSelectionMenu::CanContinue
bool CanContinue()
Check if role selection screen can be closed.
Definition
SCR_RoleSelectionMenu.c:303
ServerInfo
Definition
ServerInfo.c:8
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
EActionTrigger
EActionTrigger
Definition
EActionTrigger.c:13
ToString
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.
scripts
Game
UI
Menu
DeployMenu
SCR_RoleSelectionMenu.c
Generated by
1.17.0