Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DebriefingScreenComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "Debriefing screen shown after game ends")]
5
7class SCR_DebriefingScreenComponent : SCR_DeployMenuBaseScreenComponent
8{
9}
10
13class SCR_DebriefingScreenUnevenFourTiles : SCR_DeployMenuBaseScreenLayout
14{
15 [Attribute(defvalue: "{F7138F20BD16D89A}UI/layouts/Menus/DeployMenu/DebriefingScreenFourUnevenTiles.layout")]
16 protected ResourceName m_sFourUnevenTilesLayout;
17
18 [Attribute()]
19 protected ref SCR_WelcomeScreenBaseContent m_TopLeftTile;
20
21 [Attribute()]
22 protected ref SCR_WelcomeScreenBaseContent m_TopRightTile;
23
24 [Attribute()]
25 protected ref SCR_WelcomeScreenBaseContent m_BottomLeftTile;
26
27 [Attribute()]
28 protected ref SCR_WelcomeScreenBaseContent m_BottomRightTile;
29
30 protected const string WELCOME_CONTENT = "WelcomeContent";
31
32 protected const string TOP_LEFT_TILE = "TopLeftTile";
33 protected const string TOP_RIGHT_TILE = "TopRightTile";
34 protected const string BOTTOM_LEFT_TILE = "BottomLeftTile";
35 protected const string BOTTOM_RIGHT_TILE = "BottomRightTile";
36
37 protected const string TOP_LEFT_TILE_BUTTON = "TopLeftTileButton";
38 protected const string TOP_RIGHT_TILE_BUTTON = "TopRightTileButton";
39 protected const string BOTTOM_LEFT_TILE_BUTTON = "BottomLeftTileButton";
40 protected const string BOTTOM_RIGHT_TILE_BUTTON = "BottomRightTileButton";
41
42 //------------------------------------------------------------------------------------------------
43 override void InitContent(SCR_WelcomeScreenMenu menu)
44 {
45 Widget targetColumn = menu.GetRootWidget().FindAnyWidget(WELCOME_CONTENT);
46 if (!targetColumn)
47 return;
48
49 GetGame().GetWorkspace().CreateWidgets(m_sFourUnevenTilesLayout, targetColumn);
50
51 if (m_TopLeftTile)
52 {
53 m_aScreenBaseContents.Insert(m_TopLeftTile);
54 m_TopLeftTile.InitContent(menu, TOP_LEFT_TILE, TOP_LEFT_TILE_BUTTON);
55 }
56
57 if (m_TopRightTile)
58 {
59 m_aScreenBaseContents.Insert(m_TopRightTile);
60 m_TopRightTile.InitContent(menu, TOP_RIGHT_TILE, TOP_RIGHT_TILE_BUTTON);
61 }
62
63 if (m_BottomLeftTile)
64 {
65 m_aScreenBaseContents.Insert(m_BottomLeftTile);
66 m_BottomLeftTile.InitContent(menu, BOTTOM_LEFT_TILE, BOTTOM_LEFT_TILE_BUTTON);
67 }
68
69 if (m_BottomRightTile)
70 {
71 m_aScreenBaseContents.Insert(m_BottomRightTile);
72 m_BottomRightTile.InitContent(menu, BOTTOM_RIGHT_TILE, BOTTOM_RIGHT_TILE_BUTTON);
73 }
74 }
75}
76
79class SCR_DebriefingScreenBigImageContent : SCR_WelcomeScreenBaseContent
80{
81 [Attribute("", UIWidgets.ResourcePickerThumbnail, "Big image to be shown", params: "edds")]
82 protected ResourceName m_sContentImage;
83
84 [Attribute(defvalue: "{6CD5DC3DE2C54BBE}UI/layouts/Menus/DeployMenu/DebriefingScreenBigImageTile.layout")]
85 protected ResourceName m_sBigImageLayout;
86
87 //------------------------------------------------------------------------------------------------
92 override void InitContent(SCR_WelcomeScreenMenu menu, string column, string columnButton)
93 {
94 Widget targetTile = menu.GetRootWidget().FindAnyWidget(column);
95 if (!targetTile)
96 return;
97
98 Widget bigImageWidget = GetGame().GetWorkspace().CreateWidgets(m_sBigImageLayout, targetTile);
99 if (!bigImageWidget)
100 return;
101
102 ImageWidget imageWidget = ImageWidget.Cast(bigImageWidget.FindAnyWidget("ImageWidget"));
103 if (imageWidget && m_sContentImage)
104 imageWidget.LoadImageTexture(0, m_sContentImage, false, false);
105 }
106
107 //------------------------------------------------------------------------------------------------
110 ResourceName GetImage()
111 {
112 return m_sContentImage;
113 }
114}
115
118class SCR_DebriefingScreenSummaryContent : SCR_WelcomeScreenBaseContent
119{
120 [Attribute()]
121 protected string m_sTitleText;
122
123 [Attribute()]
124 protected string m_sSubtitleText;
125
126 [Attribute()]
127 protected string m_sSubtitleLostText;
128
129 [Attribute()]
130 protected string m_sDescriptionText;
131
132 [Attribute(defvalue: "{10A7983E48474CB2}UI/layouts/Menus/DeployMenu/DebriefingScreenSummaryTile.layout")]
133 protected ResourceName m_sSummaryLayout;
134
135 protected Widget m_wSummaryWidget;
136
137 //------------------------------------------------------------------------------------------------
142 override void InitContent(SCR_WelcomeScreenMenu menu, string column, string columnButton)
143 {
144 m_sContentName = column;
145
146 Widget targetTile = menu.GetRootWidget().FindAnyWidget(column);
147 if (!targetTile)
148 return;
149
150 m_wSummaryWidget = GetGame().GetWorkspace().CreateWidgets(m_sSummaryLayout, targetTile);
151 if (!m_wSummaryWidget)
152 return;
153
154 FillSummaryWidget();
155
156 //Invokers for in-game possibility to update these strings
157 //SOMETHING.SOMEINVOKER().Insert(UpdateSummarySubtitle);
158 //SOMETHING.SOMEINVOKER().Insert(UpdateSummaryDescription);
159 }
160
161 //------------------------------------------------------------------------------------------------
163 protected void FillSummaryWidget()
164 {
165 string characterRank = "";
166 string subtitle = GetSubtitleLostText();
167 IEntity player = GetGame().GetPlayerController().GetControlledEntity();
168 if (player)
169 {
171 if (rankComponent)
172 characterRank = rankComponent.GetCharacterRankName(player);
173 }
174
175 SCR_BaseGameMode gamemode = SCR_BaseGameMode.Cast(GetGame().GetGameMode());
176 if (!gamemode)
177 return;
178
179 SCR_FactionManager factionManager = SCR_FactionManager.Cast(GetGame().GetFactionManager());
180 if (!factionManager)
181 return;
182
183 Faction faction = factionManager.GetLocalPlayerFaction();
184 if (!faction)
185 return;
186
187 SCR_GameModeEndData endData = gamemode.GetEndGameData();
188 if (endData)
189 {
190 array<int> winnerIds = {};
191 array<int> winnerFactionIds = {};
192 endData.GetWinnerIds(winnerIds);
193 endData.GetFactionWinnerIds(winnerFactionIds);
194 if (!winnerFactionIds.IsEmpty())
195 {
196 if (winnerFactionIds.Contains(factionManager.GetFactionIndex(faction)))
197 subtitle = GetSubtitleText();
198 }
199 else if (!winnerIds.IsEmpty())
200 {
201 int playerID = GetGame().GetPlayerController().GetPlayerId();
202 if (winnerIds.Contains(playerID))
203 subtitle = GetSubtitleText();
204 }
205 }
206
207 RichTextWidget subtitleText = RichTextWidget.Cast(m_wSummaryWidget.FindAnyWidget("SubtitleText"));
208 if (subtitleText)
209 subtitleText.SetTextFormat(subtitle, characterRank, string.Format("<color rgba=%1>%2</color>", UIColors.FormatColor(UIColors.CONTRAST_COLOR), SCR_PlayerNamesFilterCache.GetInstance().GetPlayerDisplayName(GetGame().GetPlayerController().GetPlayerId())));
210
211 RichTextWidget descriptionText = RichTextWidget.Cast(m_wSummaryWidget.FindAnyWidget("DescriptionText"));
212 if (!descriptionText)
213 return;
214
215 descriptionText.SetText(GetDescriptionText());
216
217 if (SCR_StringHelper.IsEmptyOrWhiteSpace(GetDescriptionText()))
218 {
219 SCR_GameOverScreenManagerComponent gameOverScreenMgr = SCR_GameOverScreenManagerComponent.Cast(gamemode.FindComponent(SCR_GameOverScreenManagerComponent));
220 if (!gameOverScreenMgr)
221 return;
222
223 SCR_GameOverScreenConfig gameOverConfig = gameOverScreenMgr.GetGameOverConfig();
224 if (!gameOverConfig)
225 return;
226
227 SCR_BaseGameOverScreenInfo gameOverScreenInfo;
228 gameOverConfig.GetGameOverScreenInfo(gameOverScreenMgr.GetCurrentGameOverType(), gameOverScreenInfo);
229 if (!gameOverScreenInfo)
230 return;
231
232 if (!SCR_StringHelper.IsEmptyOrWhiteSpace(gameOverScreenInfo.GetDebriefing(faction, null)))
233 descriptionText.SetText(gameOverScreenInfo.GetDebriefing(faction, null));
234 else
235 descriptionText.SetText(gameOverScreenInfo.GetSubtitle(faction, null));
236 }
237 }
238
239 //------------------------------------------------------------------------------------------------
242 void UpdateSummarySubtitle(string subtitle)
243 {
244 m_sSubtitleText = subtitle;
245 RichTextWidget subtitleText = RichTextWidget.Cast(m_wSummaryWidget.FindAnyWidget("SubtitleText"));
246 if (subtitleText)
247 subtitleText.SetText(subtitle);
248 }
249
250 //------------------------------------------------------------------------------------------------
253 void UpdateSummaryDescription(string description)
254 {
255 m_sDescriptionText = description;
256 RichTextWidget descriptionText = RichTextWidget.Cast(m_wSummaryWidget.FindAnyWidget("DescriptionText"));
257 if (descriptionText)
258 descriptionText.SetText(description);
259 }
260
261 //------------------------------------------------------------------------------------------------
263 string GetTitleText()
264 {
265 return m_sTitleText;
266 }
267
268 //------------------------------------------------------------------------------------------------
270 string GetSubtitleText()
271 {
272 return m_sSubtitleText;
273 }
274
275 //------------------------------------------------------------------------------------------------
277 string GetSubtitleLostText()
278 {
279 return m_sSubtitleLostText;
280 }
281
282 //------------------------------------------------------------------------------------------------
284 string GetDescriptionText()
285 {
286 return m_sDescriptionText;
287 }
288}
289
292class SCR_DebriefingScreenFinishedObjectivesContent : SCR_WelcomeScreenBaseContent
293{
294 [Attribute()]
295 protected string m_sTitleText;
296
297 [Attribute(defvalue: "{0B7DDF77E24F0C63}UI/layouts/Menus/DeployMenu/DebriefingScreenFinishedObjectivesTile.layout")]
298 protected ResourceName m_sFinishedObjectivesTileLayout;
299
300 [Attribute(defvalue: "{6B9E63C758849B7F}UI/layouts/Menus/DeployMenu/DebriefingScreenMissionObjective.layout")]
301 protected ResourceName m_sFinishedObjectivesLayout;
302
303 [Attribute(defvalue: "7", desc: "Max number of objectives that can be shown on a single page", params: "1 inf")]
304 protected int m_iMaxNumberOfObjectives;
305
306 [Attribute(defvalue: "false", desc: "Use Task Finish History Manager for getting the list of Task Info")]
307 protected bool m_bUseTaskFinishHistoryManager;
308
309 protected Widget m_wFinishedObjectivesWidget;
310 protected ButtonWidget m_wColumnButton;
311 protected ref array<Widget> m_aFinishedObjectivesWidgets = {};
312 protected int m_iCurrentPage;
313 protected int m_iFinishedTasksCount;
314 protected ref array<ref SCR_TaskUIInfo> m_aFinishedTasksUIInfo;
315
316 //------------------------------------------------------------------------------------------------
321 override void InitContent(SCR_WelcomeScreenMenu menu, string column, string columnButton)
322 {
323 m_sContentName = column;
324
325 Widget targetTile = menu.GetRootWidget().FindAnyWidget(column);
326 if (!targetTile)
327 return;
328
329 m_wFinishedObjectivesWidget = GetGame().GetWorkspace().CreateWidgets(m_sFinishedObjectivesTileLayout, targetTile);
330 if (!m_wFinishedObjectivesWidget)
331 return;
332
333 Widget finishedObjectivesContent = m_wFinishedObjectivesWidget.FindAnyWidget("FinishedObjectivesLayout");
334 if (!finishedObjectivesContent)
335 return;
336
337 m_wColumnButton = ButtonWidget.Cast(menu.GetRootWidget().FindAnyWidget(columnButton));
338 if (!m_wColumnButton)
339 return;
340
341 FillFinishedObjectivesWidget(finishedObjectivesContent);
342 InitPagination();
343 HandlePagination(m_iFinishedTasksCount > m_iMaxNumberOfObjectives);
344 }
345
346 //------------------------------------------------------------------------------------------------
349 override void ToggleInteractions(bool enabled)
350 {
351 HandlePagination(enabled);
352 }
353
354 //------------------------------------------------------------------------------------------------
357 void ProcessTasks()
358 {
359 if (!m_aFinishedTasksUIInfo)
360 m_aFinishedTasksUIInfo = {};
361 else
362 m_aFinishedTasksUIInfo.Clear();
363
364 if (m_bUseTaskFinishHistoryManager)
365 {
366 int playerId = GetGame().GetPlayerController().GetPlayerId();
367 array<ref SCR_TaskFinishEntry> finishedTasks = SCR_TaskFinishHistoryManagerComponent.GetInstance().GetByPlayerID(playerId);
368 if (!finishedTasks)
369 return;
370
371 foreach (SCR_TaskFinishEntry entry : finishedTasks)
372 {
373 if (!entry.WasSuccessful())
374 continue;
375
376 SCR_TaskUIInfo info;
377 entry.GetUIInfo(info);
378 m_aFinishedTasksUIInfo.Insert(info);
379 }
380 }
381 else
382 {
383 SCR_TaskSystem taskSystem = SCR_TaskSystem.GetInstance();
384 if (!taskSystem)
385 return;
386
387 SCR_FactionManager factionManager = SCR_FactionManager.Cast(GetGame().GetFactionManager());
388 if (!factionManager)
389 return;
390
391 Faction faction = factionManager.GetLocalPlayerFaction();
392 if (!faction)
393 return;
394
395 array<SCR_Task> completedTasks = {};
396 taskSystem.GetTasksByState(completedTasks, SCR_ETaskState.COMPLETED, faction.GetFactionKey());
397 foreach (SCR_Task task : completedTasks)
398 {
399 m_aFinishedTasksUIInfo.Insert(task.GetTaskUIInfo());
400 }
401 }
402
403 m_iFinishedTasksCount = m_aFinishedTasksUIInfo.Count();
404 }
405
406 //------------------------------------------------------------------------------------------------
409 void FillFinishedObjectivesWidget(Widget content)
410 {
411 RichTextWidget titleText = RichTextWidget.Cast(m_wFinishedObjectivesWidget.FindAnyWidget("TitleText"));
412 if (titleText)
413 titleText.SetText(GetTitleText());
414
415 ProcessTasks();
416 FlipPage(0);
417
418 if (m_iFinishedTasksCount < m_iMaxNumberOfObjectives)
419 {
420 Widget paginationWidget = m_wFinishedObjectivesWidget.FindAnyWidget("BottomTitleSizeLayout");
421 paginationWidget.SetVisible(false);
422 }
423 }
424
425 //------------------------------------------------------------------------------------------------
427 protected void InitPagination()
428 {
429 Widget previousButtonWidget = m_wFinishedObjectivesWidget.FindAnyWidget("PrevButton");
430 if (!previousButtonWidget)
431 return;
432
433 SCR_PagingButtonComponent previousButton = SCR_PagingButtonComponent.Cast(previousButtonWidget.FindHandler(SCR_PagingButtonComponent));
434 if (previousButton)
435 previousButton.m_OnClicked.Insert(ButtonClicked);
436
437 Widget nextButtonWidget = m_wFinishedObjectivesWidget.FindAnyWidget("NextButton");
438 if (!nextButtonWidget)
439 return;
440
441 SCR_PagingButtonComponent nextButton = SCR_PagingButtonComponent.Cast(nextButtonWidget.FindHandler(SCR_PagingButtonComponent));
442 if (nextButton)
443 nextButton.m_OnClicked.Insert(ButtonClicked);
444 }
445
446 //------------------------------------------------------------------------------------------------
448 protected void ButtonClicked()
449 {
450 GetGame().GetWorkspace().SetFocusedWidget(m_wColumnButton);
451 }
452
453 //------------------------------------------------------------------------------------------------
456 protected void HandlePagination(bool enabled = false)
457 {
458 Widget previousButtonWidget = m_wFinishedObjectivesWidget.FindAnyWidget("PrevButton");
459 if (!previousButtonWidget)
460 return;
461
462 SCR_PagingButtonComponent previousButton = SCR_PagingButtonComponent.Cast(previousButtonWidget.FindHandler(SCR_PagingButtonComponent));
463 if (!previousButton)
464 return;
465
466 if (enabled)
467 previousButton.m_OnActivated.Insert(PreviousButtonActivated);
468 else
469 previousButton.m_OnActivated.Remove(PreviousButtonActivated);
470
471 Widget nextButtonWidget = m_wFinishedObjectivesWidget.FindAnyWidget("NextButton");
472 if (!nextButtonWidget)
473 return;
474
475 SCR_PagingButtonComponent nextButton = SCR_PagingButtonComponent.Cast(nextButtonWidget.FindHandler(SCR_PagingButtonComponent));
476 if (!nextButton)
477 return;
478
479 if (enabled)
480 nextButton.m_OnActivated.Insert(NextButtonActivated);
481 else
482 nextButton.m_OnActivated.Remove(NextButtonActivated);
483 }
484
485 //------------------------------------------------------------------------------------------------
487 protected void PreviousButtonActivated()
488 {
489 int currentPage = GetCurrentPage();
490 currentPage--;
491 if (currentPage < 0)
492 {
493 FlipPage(0);
494 return;
495 }
496
497 FlipPage(currentPage);
498 }
499
500 //------------------------------------------------------------------------------------------------
502 protected void NextButtonActivated()
503 {
504 int currentPage = GetCurrentPage();
505 currentPage++;
506 if (currentPage == Math.Ceil(m_iFinishedTasksCount/6))
507 return;
508
509 FlipPage(currentPage);
510 }
511
512 //------------------------------------------------------------------------------------------------
515 protected void FlipPage(int currentPage)
516 {
517 int taskId;
518 Widget entry;
519 SCR_TaskUIInfo info;
520 RichTextWidget name;
521 Widget finishedObjectivesContentHolder;
522 for (int i = 0; i < m_iMaxNumberOfObjectives - 1; i++)
523 {
524 taskId = currentPage * (m_iMaxNumberOfObjectives - 1) + i;
525 if (m_aFinishedObjectivesWidgets.IsIndexValid(i))
526 entry = m_aFinishedObjectivesWidgets[i];
527 else
528 entry = null;
529
530 if (taskId >= m_iFinishedTasksCount)
531 {
532 if (entry)
533 entry.SetVisible(false);
534
535 continue;
536 }
537
538 if (!entry)
539 {
540 if (!finishedObjectivesContentHolder)
541 {
542 finishedObjectivesContentHolder = m_wFinishedObjectivesWidget.FindAnyWidget("FinishedObjectivesLayout");
543 if (!finishedObjectivesContentHolder)
544 continue;
545 }
546
547 entry = GetGame().GetWorkspace().CreateWidgets(m_sFinishedObjectivesLayout, finishedObjectivesContentHolder);
548 m_aFinishedObjectivesWidgets.Insert(entry);
549 }
550
551 entry.SetVisible(true);
552 name = RichTextWidget.Cast(entry.FindAnyWidget("ObjectiveText"));
553 info = m_aFinishedTasksUIInfo[taskId];
554 info.SetNameTo(name);
555 }
556
557 SetCurrentPage(currentPage);
558
559 Widget pages = m_wFinishedObjectivesWidget.FindAnyWidget("Pages");
560 if (!pages)
561 return;
562
563 SCR_SelectionHintComponent pagesVisualised = SCR_SelectionHintComponent.Cast(pages.FindHandler(SCR_SelectionHintComponent));
564 if (!pagesVisualised)
565 return;
566
567 pagesVisualised.SetItemCount(m_iFinishedTasksCount/6);
568 pagesVisualised.SetCurrentItem(currentPage);
569 }
570
571 //------------------------------------------------------------------------------------------------
574 int GetCurrentPage()
575 {
576 return m_iCurrentPage;
577 }
578
579 //------------------------------------------------------------------------------------------------
583 void SetCurrentPage(int page)
584 {
585 m_iCurrentPage = page;
586 }
587
588 //------------------------------------------------------------------------------------------------
590 string GetTitleText()
591 {
592 return m_sTitleText;
593 }
594}
595
598class SCR_DebriefingScreenStatisticsContent : SCR_WelcomeScreenBaseContent
599{
600 [Attribute()]
601 protected string m_sTitleText;
602
603 [Attribute()]
604 protected ref array<ref SCR_DebriefingScreenStatisticBaseClass> m_aStatistics;
605
606 [Attribute(defvalue: "{64B98222099C391E}UI/layouts/Menus/DeployMenu/DebriefingScreenStatisticsTile.layout")]
607 protected ResourceName m_sStatisticsTileLayout;
608
609 [Attribute(defvalue: "{F2B6C48FDA2E261E}UI/layouts/Menus/DeployMenu/DebriefingScreenStatistic.layout")]
610 protected ResourceName m_sStatisticsLayout;
611
612 protected Widget m_wStatisticsWidget;
613
614 //------------------------------------------------------------------------------------------------
619 override void InitContent(SCR_WelcomeScreenMenu menu, string column, string columnButton)
620 {
621 m_sContentName = column;
622
623 Widget targetTile = menu.GetRootWidget().FindAnyWidget(column);
624 if (!targetTile)
625 return;
626
627 m_wStatisticsWidget = GetGame().GetWorkspace().CreateWidgets(m_sStatisticsTileLayout, targetTile);
628 if (!m_wStatisticsWidget)
629 return;
630
631 Widget statisticsContent = m_wStatisticsWidget.FindAnyWidget("StatsLayout");
632 if (!statisticsContent)
633 return;
634
635 FillStatisticsWidget(statisticsContent);
636 }
637
638 //------------------------------------------------------------------------------------------------
641 void FillStatisticsWidget(Widget content)
642 {
643 RichTextWidget titleText = RichTextWidget.Cast(m_wStatisticsWidget.FindAnyWidget("TitleText"));
644 titleText.SetText(GetTitleText());
645
646 array<ref SCR_DebriefingScreenStatisticBaseClass> statistics = {};
647 int statisticsCount;
648 statisticsCount = GetStatistics(statistics);
649
650 int statsCycleCount;
651 if (statisticsCount < 7)
652 statsCycleCount = statisticsCount;
653 else
654 statsCycleCount = 6;
655
656 SCR_PlayerData playerData = GetGame().GetDataCollector().GetPlayerData(0, true, false);
657 //We Calculate the stats difference only applicable for this particular session
658 array<float> stats = playerData.CalculateStatsDifference();
659 //Statistics are capped for 6 at the time
660 for (int i = 0; i < statsCycleCount; ++i)
661 {
662 //statsCycleCount--;
663 Widget statistic = GetGame().GetWorkspace().CreateWidgets(m_sStatisticsLayout, content);
664
665 statistics[i].InitStatistic(stats);
666 RichTextWidget name = RichTextWidget.Cast(statistic.FindAnyWidget("StatisticResult"));
667 name.SetText(statistics[i].GetStatisticResult());
668 }
669 }
670
671 //------------------------------------------------------------------------------------------------
675 int GetStatistics(out array<ref SCR_DebriefingScreenStatisticBaseClass> statistics)
676 {
677 statistics = m_aStatistics;
678
679 return m_aStatistics.Count();
680 }
681
682 //------------------------------------------------------------------------------------------------
684 string GetTitleText()
685 {
686 return m_sTitleText;
687 }
688}
689
692class SCR_DebriefingScreenStatisticBaseClass
693{
694 protected string m_sStatisticResult;
695
696 //------------------------------------------------------------------------------------------------
699 void InitStatistic(notnull array<float> stats);
700
701 //------------------------------------------------------------------------------------------------
703 string GetStatisticResult()
704 {
705 return m_sStatisticResult;
706 }
707}
708
711class SCR_DebriefingScreenStatisticShotsFired : SCR_DebriefingScreenStatisticBaseClass
712{
713 //------------------------------------------------------------------------------------------------
714 override void InitStatistic(notnull array<float> stats)
715 {
716 m_sStatisticResult = string.Format(WidgetManager.Translate("<b>#AR-DebriefingScreen_Statistics_Rounds</b>", Math.Floor(stats[SCR_EDataStats.SHOTS])));
717 }
718}
719
722class SCR_DebriefingScreenStatisticKills : SCR_DebriefingScreenStatisticBaseClass
723{
724 //------------------------------------------------------------------------------------------------
725 override void InitStatistic(notnull array<float> stats)
726 {
727 m_sStatisticResult = string.Format(WidgetManager.Translate("<b>#AR-DebriefingScreen_Statistics_Kills</b>", Math.Floor(stats[SCR_EDataStats.AI_KILLS] + stats[SCR_EDataStats.KILLS])));
728 }
729}
730
733class SCR_DebriefingScreenStatisticDeaths : SCR_DebriefingScreenStatisticBaseClass
734{
735 //------------------------------------------------------------------------------------------------
736
737 override void InitStatistic(notnull array<float> stats)
738 {
739 m_sStatisticResult = string.Format(WidgetManager.Translate("<b>#AR-DebriefingScreen_Statistics_Deaths</b>", Math.Floor(stats[SCR_EDataStats.DEATHS])));
740 }
741}
742
745class SCR_DebriefingScreenStatisticDistanceWalked : SCR_DebriefingScreenStatisticBaseClass
746{
747 //------------------------------------------------------------------------------------------------
748 override void InitStatistic(notnull array<float> stats)
749 {
750 m_sStatisticResult = string.Format(WidgetManager.Translate("<b>#AR-DebriefingScreen_Statistics_DistanceWalked</b>", Math.Floor(stats[SCR_EDataStats.DISTANCE_WALKED]/1000)));
751 }
752}
753
756class SCR_DebriefingScreenStatisticDistanceDriven : SCR_DebriefingScreenStatisticBaseClass
757{
758 //------------------------------------------------------------------------------------------------
759 override void InitStatistic(notnull array<float> stats)
760 {
761 m_sStatisticResult = string.Format(WidgetManager.Translate("<b>#AR-DebriefingScreen_Statistics_DistanceDriven</b>", Math.Floor(stats[SCR_EDataStats.DISTANCE_DRIVEN]/1000)));
762 }
763}
class RestAPIHelper< JsonApiStruct T > content
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
string m_sDescriptionText
SCR_BaseGameMode GetGameMode()
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
SCR_DebriefingScreenComponentClass SCR_DeployMenuBaseScreenComponentClass BaseContainerProps()
Debriefing screen component intended to be added to the GameMode.
Get all prefabs that have the spawner the given labels and are valid in the editor mode param catalogType Type to catalog to get prefabs from param editorMode Editor mode to get valid entries from param faction Faction(Optional)
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_EDataStats
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
SCR_ETaskState
Definition SCR_Task.c:3
void SCR_TaskFinishHistoryManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
string m_sSubtitleText
string GetSubtitleText()
const string WELCOME_CONTENT
override void InitContent(SCR_WelcomeScreenMenu menu)
SCR_WelcomeScreenComponentClass SCR_DeployMenuBaseScreenComponent
Welcome screen component intended to be added to the GameMode.
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
SCR_GameModeEndData GetEndGameData()
string GetSubtitle(Faction factionPlayer, array< Faction > factionsOther)
string GetDebriefing(Faction factionPlayer, array< Faction > factionsOther)
Base class for Deploy menu layouts.
void InitContent(SCR_WelcomeScreenMenu menu)
bool GetGameOverScreenInfo(EGameOverTypes infoId, out SCR_BaseGameOverScreenInfo gameOverScreenInfo)
sealed array< float > CalculateStatsDifference()
void SetCurrentItem(int index, bool animate=true)
void SetItemCount(int count, bool animate=true)
override bool SetNameTo(TextWidget textWidget)
SCR_DeployMenuBaseScreenComponentClass SCR_BaseGameModeComponentClass Attribute()] protected string m_sHeaderTitle
Base class for Deploy menu components.
proto external PlayerController GetPlayerController()
proto external int GetPlayerId()