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_BuilderNameTooltipDetail.c
Go to the documentation of this file.
1
2
[
BaseContainerProps
(),
BaseContainerCustomTitleField
(
"m_sDisplayName"
)]
3
class
SCR_BuilderNameTooltipDetail
:
SCR_EntityTooltipDetail
4
{
5
protected
const
string
AUTHOR_TEXT_WIDGET_NAME
=
"Text"
;
6
protected
const
string
PLATFORM_ICON_WIDGET_NAME
=
"PlatformIcon"
;
7
8
//---- REFACTOR NOTE START: Searching for "Text" dirrectly
9
10
//------------------------------------------------------------------------------------------------
11
override
bool
InitDetail
(
SCR_EditableEntityComponent
entity,
Widget
widget)
12
{
13
TextWidget
text =
TextWidget
.Cast(widget.FindAnyWidget(
AUTHOR_TEXT_WIDGET_NAME
));
14
if
(!text)
15
return
false
;
16
17
BaseGameMode gameMode =
GetGame
().GetGameMode();
18
if
(!gameMode)
19
return
false
;
20
21
const
int
authorId = entity.
GetAuthorPlayerID
();
22
if
(authorId <= 0)
//SCR_EditableEntityComponent.GetAuthorPlayerID can return 0 when there is no author
23
return
false
;
24
25
const
string
name =
SCR_PlayerNamesFilterCache
.GetInstance().GetPlayerDisplayName(authorId);
26
if
(
SCR_StringHelper
.
IsEmptyOrWhiteSpace
(name))
27
return
false
;
28
29
text.SetText(name);
30
31
const
PlatformKind
authorPlatform = entity.
GetAuthorPlatform
();
32
ImageWidget
platformIcon =
ImageWidget
.Cast(widget.FindAnyWidget(
PLATFORM_ICON_WIDGET_NAME
));
33
if
(platformIcon && authorPlatform !=
PlatformKind
.NONE)
34
{
35
SCR_PlayerController
playerController =
SCR_PlayerController
.Cast(
GetGame
().
GetPlayerController
());
36
if
(playerController)
37
playerController.SetPlatformImageToKind(authorPlatform, platformIcon, showOnPC:
true
, showOnXbox:
true
);
38
}
39
40
return
true
;
41
}
42
43
//---- REFACTOR NOTE END ----
44
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
PlatformKind
PlatformKind
Definition
PlatformKind.c:8
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition
SCR_KeyBindingMenuConfig.c:116
ImageWidget
Definition
ImageWidget.c:13
SCR_BuilderNameTooltipDetail
Definition
SCR_BuilderNameTooltipDetail.c:4
SCR_BuilderNameTooltipDetail::InitDetail
override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
Definition
SCR_BuilderNameTooltipDetail.c:11
SCR_BuilderNameTooltipDetail::AUTHOR_TEXT_WIDGET_NAME
const string AUTHOR_TEXT_WIDGET_NAME
Definition
SCR_BuilderNameTooltipDetail.c:5
SCR_BuilderNameTooltipDetail::PLATFORM_ICON_WIDGET_NAME
const string PLATFORM_ICON_WIDGET_NAME
Definition
SCR_BuilderNameTooltipDetail.c:6
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::GetAuthorPlayerID
int GetAuthorPlayerID()
Definition
SCR_EditableEntityComponent.c:404
SCR_EditableEntityComponent::GetAuthorPlatform
PlatformKind GetAuthorPlatform()
Definition
SCR_EditableEntityComponent.c:425
SCR_EntityTooltipDetail
Definition
SCR_EntityTooltipDetail.c:3
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_PlayerNamesFilterCache
Definition
SCR_PlayerNamesFilterCache.c:3
SCR_StringHelper
Definition
SCR_StringHelper.c:2
SCR_StringHelper::IsEmptyOrWhiteSpace
static bool IsEmptyOrWhiteSpace(string input)
Definition
SCR_StringHelper.c:594
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
GetPlayerController
proto external PlayerController GetPlayerController()
Definition
SCR_PlayerDeployMenuHandlerComponent.c:307
scripts
Game
Editor
UI
Components
Tooltips
Tooltips
Details
SCR_BuilderNameTooltipDetail.c
Generated by
1.17.0