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_BaseEditableEntityUIComponent.c
Go to the documentation of this file.
1
2
8
class
SCR_BaseEditableEntityUIComponent
:
ScriptedWidgetComponent
9
{
10
[
Attribute
(
desc
:
"When true, the icon will remain visible on edge of the screen when it's not in the view."
)]
11
private
bool
m_bShowOffScreen;
12
13
private
Widget
m_Widget;
14
protected
SCR_EditableEntityComponent
m_Entity
;
15
private
WorkspaceWidget
m_Workspace;
16
private
float
m_fFade;
17
18
//------------------------------------------------------------------------------------------------
21
void
OnRefresh(
SCR_EditableEntityBaseSlotUIComponent
slot);
22
23
//------------------------------------------------------------------------------------------------
28
void
OnInit
(
SCR_EditableEntityComponent
entity,
SCR_UIInfo
info,
SCR_EditableEntityBaseSlotUIComponent
slot);
29
30
//------------------------------------------------------------------------------------------------
33
void
OnShownOffScreen(
bool
offScreen);
34
35
//------------------------------------------------------------------------------------------------
39
void
Init
(
SCR_EditableEntityComponent
entity,
SCR_EditableEntityBaseSlotUIComponent
slot)
40
{
41
if
(entity)
42
{
43
m_Entity
= entity;
44
OnInit
(entity, entity.
GetInfo
(), slot)
45
}
46
}
47
48
//------------------------------------------------------------------------------------------------
53
sealed
void
Init
(SCR_UIInfo info, SCR_EditableEntityBaseSlotUIComponent slot)
54
{
55
if
(info)
56
OnInit
(null, info, slot)
57
}
58
59
//------------------------------------------------------------------------------------------------
62
void
Exit(SCR_EditableEntityBaseSlotUIComponent slot)
63
{
64
if
(m_Widget)
65
{
66
m_Widget.RemoveFromHierarchy();
67
m_Widget = null;
68
}
69
}
70
//------------------------------------------------------------------------------------------------
72
SCR_EditableEntityComponent
GetEntity
()
73
{
74
return
m_Entity
;
75
}
76
77
//------------------------------------------------------------------------------------------------
79
Widget
GetWidget
()
80
{
81
return
m_Widget;
82
}
83
84
//------------------------------------------------------------------------------------------------
86
bool
IsVisible
()
87
{
88
return
m_Widget && m_Widget.IsVisible();
89
}
90
91
//------------------------------------------------------------------------------------------------
94
void
SetVisible(
bool
visible)
95
{
96
m_Widget.SetVisible(visible);
97
m_Widget.SetEnabled(visible);
98
}
99
100
// //------------------------------------------------------------------------------------------------
101
// //! Get faction of editable entity.
102
// //! \param[in] owner Entity which will be checked (by default the entity the widget represents)
103
// //! \return Faction
104
// Faction GetFaction(GenericEntity owner = null)
105
// {
106
// if (!owner && m_Entity)
107
// owner = m_Entity.GetOwner();
108
//
109
// if (!owner)
110
// return null;
111
//
112
// FactionAffiliationComponent factionComponent = FactionAffiliationComponent.Cast(owner.FindComponent(FactionAffiliationComponent));
113
// if (!factionComponent)
114
// return null;
115
//
116
// return factionComponent.GetAffiliatedFaction();
117
// }
118
119
//------------------------------------------------------------------------------------------------
122
bool
IsShownOffScreen()
123
{
124
return
m_bShowOffScreen;
// || m_Entity.HasEntityState(EEditableEntityState.CURRENT_LAYER_CHILDREN);
125
}
126
127
//------------------------------------------------------------------------------------------------
128
override
void
HandlerAttached(Widget w)
129
{
130
m_Widget = w;
131
m_Workspace =
GetGame
().GetWorkspace();
132
m_fFade = 0;
133
}
134
}
Init
override void Init()
Definition
CharacterCameraHandlerComponent.c:40
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
IsVisible
bool IsVisible()
Definition
SCR_ResourceComponent.c:885
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
GetWidget
Widget GetWidget()
Definition
SCR_VonDisplay.c:162
SCR_BaseEditableEntityUIComponent
Definition
SCR_BaseEditableEntityUIComponent.c:9
SCR_BaseEditableEntityUIComponent::m_Entity
SCR_EditableEntityComponent m_Entity
Definition
SCR_BaseEditableEntityUIComponent.c:14
SCR_EditableEntityBaseSlotUIComponent
Definition
SCR_EditableEntityBaseSlotUIComponent.c:7
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::GetInfo
SCR_UIInfo GetInfo(IEntity owner=null)
Definition
SCR_EditableEntityComponent.c:151
SCR_UIInfo
Definition
SCR_UIInfo.c:8
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
Widget
Definition
Widget.c:13
WorkspaceWidget
Definition
WorkspaceWidget.c:16
GetEntity
IEntity GetEntity()
Definition
SCR_QuickslotBaseContainer.c:34
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
scripts
Game
Editor
UI
Components
EditableEntities
SCR_BaseEditableEntityUIComponent.c
Generated by
1.17.0