Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ButtonListComponent.c
Go to the documentation of this file.
1/*
2Component for handling button specific list view
3*/
4
5//------------------------------------------------------------------------------------------------
7{
8 protected ref array<SCR_ButtonComponent> m_aButtons = new array<SCR_ButtonComponent>;
9
11
12 //-------------------------------------
13 // List component override
14 //-------------------------------------
15
16 //------------------------------------------------------------------------------------------------
17 override void HandlerAttached(Widget w)
18 {
19 super.HandlerAttached(w);
20 }
21
22 //------------------------------------------------------------------------------------------------
24 override protected void SetupEntryBehavior(Widget entry)
25 {
26 // Entry check
27 if (!entry)
28 return;
29
30 // Find server entry component
31 SCR_ButtonComponent button = SCR_ButtonComponent.Cast(entry.FindHandler(SCR_ButtonComponent));
32 if (!button)
33 return;
34
35 // Invokers
36 button.m_OnFocus.Insert(OnEntryFocus);
37
38 // Insert to list
39 m_aButtons.Insert(button);
40 }
41
42 //-------------------------------------
43 // Invoker actions
44 //-------------------------------------
45
46 //------------------------------------------------------------------------------------------------
48 protected void OnEntryFocus(Widget w)
49 {
50 m_OnEntryFocus.Invoke();
51
53 }
54
55 //-------------------------------------
56 // Get & Set
57 //-------------------------------------
58
59 //------------------------------------------------------------------------------------------------
60 array<SCR_ButtonComponent> GetButtons() { return m_aButtons; }
61};
Definition Math.c:13
Deprecated button component. Still used in many prefabs, so it works, it's just stripped of most of t...
array< SCR_ButtonComponent > GetButtons()
void OnEntryFocus(Widget w)
Call this when entry in list is focused.
override void HandlerAttached(Widget w)
ref array< SCR_ButtonComponent > m_aButtons
void SetupEntryBehavior(Widget entry)
Setup server entry component behavior.
ref array< Widget > m_aEntryWidgets
ScriptInvokerBase< func > ScriptInvoker
Definition tools.c:134