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_InventorySpinBoxComponent.c
Go to the documentation of this file.
1
class
SCR_InventorySpinBoxComponent
:
SCR_SpinBoxComponent
2
{
3
protected
bool
m_bIsFocused
;
4
protected
SCR_InventoryHitZoneUI
m_FocusedPoint
;
5
6
override
void
HandlerAttached
(
Widget
w)
7
{
8
super.HandlerAttached(w);
9
SetNavigationActive
(
false
);
10
m_OnChanged
.Insert(
OnSpinBoxSelectionChanged
);
11
}
12
13
override
bool
OnFocus
(
Widget
w,
int
x,
int
y)
14
{
15
super.OnFocus(w, x, y);
16
SetNavigationActive
(
true
);
17
m_bIsFocused
=
true
;
18
19
OnSpinBoxSelectionChanged
(
this
,
m_iSelectedItem
);
20
if
(
m_FocusedPoint
)
21
m_FocusedPoint
.GetMenuHandler().OnAttachmentSpinboxFocused();
22
23
return
false
;
24
}
25
26
override
bool
OnFocusLost
(
Widget
w,
int
x,
int
y)
27
{
28
super.OnFocusLost(w, x, y);
29
SetNavigationActive
(
false
);
30
m_bIsFocused
=
false
;
31
32
return
false
;
33
}
34
35
void
OnSpinBoxSelectionChanged
(
SCR_SpinBoxComponent
comp,
int
itemIndex)
36
{
37
if
(!
m_bIsFocused
|| itemIndex < 0)
38
return
;
39
40
m_FocusedPoint
= null;
41
SCR_InventoryHitZonePointContainerUI
hzContainer =
SCR_InventoryHitZonePointContainerUI
.Cast(comp.GetCurrentItemData());
42
if
(hzContainer)
43
{
44
m_FocusedPoint
= hzContainer.
GetStorage
();
45
hzContainer.
ShowApplicableItems
();
46
}
47
48
SCR_InventorySlotGearInspectionUI
point =
SCR_InventorySlotGearInspectionUI
.Cast(comp.GetCurrentItemData());
49
if
(point)
50
{
51
point.
ShowCompatibleAttachments
();
52
}
53
}
54
55
int
FindItem
(
string
item)
56
{
57
return
m_aElementNames.Find(item);
58
}
59
60
bool
IsFocused
()
61
{
62
return
m_bIsFocused
;
63
}
64
65
SCR_InventoryHitZoneUI
GetFocusedHZPoint
()
66
{
67
return
m_FocusedPoint
;
68
}
69
70
void
SetNavigationActive
(
bool
active)
71
{
72
if
(
m_ButtonLeft
)
73
{
74
if
(!active)
75
m_ButtonLeft
.m_OnClicked.Remove(
OnLeftArrowClick
);
76
else
77
m_ButtonLeft
.m_OnClicked.Insert(
OnLeftArrowClick
);
78
}
79
if
(
m_ButtonRight
)
80
{
81
if
(!active)
82
m_ButtonRight
.m_OnClicked.Remove(
OnRightArrowClick
);
83
else
84
m_ButtonRight
.m_OnClicked.Insert(
OnRightArrowClick
);
85
}
86
}
87
88
override
protected
void
OnMenuLeft
()
89
{
90
91
}
92
93
override
protected
void
OnMenuRight
()
94
{
95
96
}
97
98
};
SCR_ChangeableComponentBase::m_OnChanged
ref ScriptInvoker m_OnChanged
Definition
SCR_ChangeableComponentBase.c:34
SCR_InventoryHitZonePointContainerUI
Definition
SCR_InventoryHitZonePointUI.c:3
SCR_InventoryHitZonePointContainerUI::GetStorage
SCR_InventoryHitZoneUI GetStorage()
Definition
SCR_InventoryHitZonePointUI.c:341
SCR_InventoryHitZonePointContainerUI::ShowApplicableItems
void ShowApplicableItems()
Definition
SCR_InventoryHitZonePointUI.c:118
SCR_InventoryHitZoneUI
Definition
SCR_InventoryHitZoneSlotUI.c:2
SCR_InventorySlotGearInspectionUI
Definition
SCR_InventoryGearInspectionSlotUI.c:288
SCR_InventorySlotGearInspectionUI::ShowCompatibleAttachments
void ShowCompatibleAttachments()
Definition
SCR_InventoryGearInspectionSlotUI.c:360
SCR_InventorySpinBoxComponent
Definition
SCR_InventorySpinBoxComponent.c:2
SCR_InventorySpinBoxComponent::OnFocus
override bool OnFocus(Widget w, int x, int y)
Definition
SCR_InventorySpinBoxComponent.c:13
SCR_InventorySpinBoxComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_InventorySpinBoxComponent.c:6
SCR_InventorySpinBoxComponent::OnFocusLost
override bool OnFocusLost(Widget w, int x, int y)
Definition
SCR_InventorySpinBoxComponent.c:26
SCR_InventorySpinBoxComponent::m_bIsFocused
bool m_bIsFocused
Definition
SCR_InventorySpinBoxComponent.c:3
SCR_InventorySpinBoxComponent::SetNavigationActive
void SetNavigationActive(bool active)
Definition
SCR_InventorySpinBoxComponent.c:70
SCR_InventorySpinBoxComponent::OnMenuLeft
void OnMenuLeft()
Definition
SCR_InventorySpinBoxComponent.c:88
SCR_InventorySpinBoxComponent::GetFocusedHZPoint
SCR_InventoryHitZoneUI GetFocusedHZPoint()
Definition
SCR_InventorySpinBoxComponent.c:65
SCR_InventorySpinBoxComponent::OnSpinBoxSelectionChanged
void OnSpinBoxSelectionChanged(SCR_SpinBoxComponent comp, int itemIndex)
Definition
SCR_InventorySpinBoxComponent.c:35
SCR_InventorySpinBoxComponent::IsFocused
bool IsFocused()
Definition
SCR_InventorySpinBoxComponent.c:60
SCR_InventorySpinBoxComponent::FindItem
int FindItem(string item)
Definition
SCR_InventorySpinBoxComponent.c:55
SCR_InventorySpinBoxComponent::m_FocusedPoint
SCR_InventoryHitZoneUI m_FocusedPoint
Definition
SCR_InventorySpinBoxComponent.c:4
SCR_InventorySpinBoxComponent::OnMenuRight
void OnMenuRight()
Definition
SCR_InventorySpinBoxComponent.c:93
SCR_SelectionWidgetComponent::m_iSelectedItem
int m_iSelectedItem
Definition
SCR_SelectionWidgetComponent.c:9
SCR_SpinBoxComponent
Definition
SCR_SpinBoxComponent.c:2
SCR_SpinBoxComponent::OnRightArrowClick
void OnRightArrowClick()
Definition
SCR_SpinBoxComponent.c:286
SCR_SpinBoxComponent::m_ButtonRight
SCR_PagingButtonComponent m_ButtonRight
Definition
SCR_SpinBoxComponent.c:7
SCR_SpinBoxComponent::m_ButtonLeft
SCR_PagingButtonComponent m_ButtonLeft
Definition
SCR_SpinBoxComponent.c:6
SCR_SpinBoxComponent::OnLeftArrowClick
void OnLeftArrowClick()
Definition
SCR_SpinBoxComponent.c:267
Widget
Definition
Widget.c:13
scripts
Game
UI
Inventory
SCR_InventorySpinBoxComponent.c
Generated by
1.17.0