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_SpawnPointSpinBox.c
Go to the documentation of this file.
1
class
SCR_SpawnPointSpinBox
:
SCR_SpinBoxComponent
2
{
3
protected
ref array<RplId>
m_aSpawnPointIds
= {};
4
protected
bool
m_bFocused
;
5
6
override
bool
OnFocus
(
Widget
w,
int
x,
int
y)
7
{
8
super.OnFocus(w, x, y);
9
m_bFocused
=
true
;
10
11
return
false
;
12
}
13
14
override
bool
OnFocusLost
(
Widget
w,
int
x,
int
y)
15
{
16
super.OnFocusLost(w, x, y);
17
m_bFocused
=
false
;
18
19
return
false
;
20
}
21
22
int
AddItem
(
string
item,
RplId
id
)
23
{
24
if
(!
id
.
IsValid
() ||
m_aSpawnPointIds
.Find(
id
) > -1)
25
return
-1;
26
int
i =
AddItem
(item);
27
m_aSpawnPointIds
.Insert(
id
);
28
SetInitialState
();
29
30
return
i;
31
}
32
33
override
void
RemoveItem
(
int
item,
bool
last =
false
)
34
{
35
if
(
m_aSpawnPointIds
.IsIndexValid(item))
36
m_aSpawnPointIds
.Remove(item);
37
38
super.RemoveItem(item,
true
);
39
}
40
41
override
void
ClearAll
()
42
{
43
super.ClearAll();
44
m_aSpawnPointIds
.Clear();
45
}
46
47
RplId
GetSpawnPointId
(
int
itemId)
48
{
49
if
(
m_aSpawnPointIds
.IsEmpty())
50
return
RplId
.Invalid();
51
return
m_aSpawnPointIds
.Get(itemId);
52
}
53
54
int
GetItemId
(
RplId
id
)
55
{
56
return
m_aSpawnPointIds
.Find(
id
);
57
}
58
59
bool
IsEmpty
()
60
{
61
return
m_aSpawnPointIds
.IsEmpty();
62
}
63
64
void
SetItemName
(
int
id
,
string
name)
65
{
66
if
(m_aElementNames.IsIndexValid(
id
))
67
{
68
m_aElementNames[
id
] = name;
69
SetInitialState
(
false
);
70
}
71
}
72
73
array<SCR_SpawnPoint>
GetSpawnPointsInList
()
74
{
75
array<SCR_SpawnPoint> result = {};
76
foreach
(
RplId
id
:
m_aSpawnPointIds
)
77
{
78
SCR_SpawnPoint
sp =
SCR_SpawnPoint
.
GetSpawnPointByRplId
(
id
);
79
if
(sp)
80
result.Insert(sp);
81
}
82
83
return
result;
84
}
85
86
bool
IsFocused
()
87
{
88
return
m_bFocused
&&
GetGame
().GetInputManager().IsUsingMouseAndKeyboard();
89
}
90
};
id
AddonBuildInfoTool id
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
IsValid
bool IsValid()
Definition
SCR_ItemOutfitFactionComponent.c:144
RplId
Replication item identifier.
Definition
RplId.c:14
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition
SCR_SpawnPoint.c:28
SCR_SpawnPoint::GetSpawnPointByRplId
static SCR_SpawnPoint GetSpawnPointByRplId(RplId id)
Definition
SCR_SpawnPoint.c:311
SCR_SpawnPointSpinBox
Definition
SCR_SpawnPointSpinBox.c:2
SCR_SpawnPointSpinBox::SetItemName
void SetItemName(int id, string name)
Definition
SCR_SpawnPointSpinBox.c:64
SCR_SpawnPointSpinBox::m_bFocused
bool m_bFocused
Definition
SCR_SpawnPointSpinBox.c:4
SCR_SpawnPointSpinBox::ClearAll
override void ClearAll()
Definition
SCR_SpawnPointSpinBox.c:41
SCR_SpawnPointSpinBox::AddItem
int AddItem(string item, RplId id)
Definition
SCR_SpawnPointSpinBox.c:22
SCR_SpawnPointSpinBox::GetSpawnPointId
RplId GetSpawnPointId(int itemId)
Definition
SCR_SpawnPointSpinBox.c:47
SCR_SpawnPointSpinBox::OnFocus
override bool OnFocus(Widget w, int x, int y)
Definition
SCR_SpawnPointSpinBox.c:6
SCR_SpawnPointSpinBox::m_aSpawnPointIds
ref array< RplId > m_aSpawnPointIds
Definition
SCR_SpawnPointSpinBox.c:3
SCR_SpawnPointSpinBox::IsFocused
bool IsFocused()
Definition
SCR_SpawnPointSpinBox.c:86
SCR_SpawnPointSpinBox::IsEmpty
bool IsEmpty()
Definition
SCR_SpawnPointSpinBox.c:59
SCR_SpawnPointSpinBox::GetSpawnPointsInList
array< SCR_SpawnPoint > GetSpawnPointsInList()
Definition
SCR_SpawnPointSpinBox.c:73
SCR_SpawnPointSpinBox::OnFocusLost
override bool OnFocusLost(Widget w, int x, int y)
Definition
SCR_SpawnPointSpinBox.c:14
SCR_SpawnPointSpinBox::RemoveItem
override void RemoveItem(int item, bool last=false)
Definition
SCR_SpawnPointSpinBox.c:33
SCR_SpawnPointSpinBox::GetItemId
int GetItemId(RplId id)
Definition
SCR_SpawnPointSpinBox.c:54
SCR_SpinBoxComponent
Definition
SCR_SpinBoxComponent.c:2
SCR_SpinBoxComponent::SetInitialState
void SetInitialState(bool invokeOnChanged=true)
Definition
SCR_SpinBoxComponent.c:233
Widget
Definition
Widget.c:13
scripts
Game
UI
Menu
DeployMenu
SCR_SpawnPointSpinBox.c
Generated by
1.17.0