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_TaskAssignButton.c
Go to the documentation of this file.
1
[
Obsolete
(
"Replaced with SCR_TaskMapUIComponent"
)]
2
class
SCR_TaskAssignButton
:
ScriptedWidgetComponent
3
{
4
/*
5
protected SCR_MapUITask m_MapUiTask;
6
protected ref ScriptInvoker m_OnMapIconClick;
7
8
//------------------------------------------------------------------------------------------------
9
ScriptInvoker GetOnMapIconClick()
10
{
11
if (!m_OnMapIconClick)
12
m_OnMapIconClick = new ScriptInvoker();
13
14
return m_OnMapIconClick;
15
}
16
17
//------------------------------------------------------------------------------------------------
18
override bool OnClick(Widget w, int x, int y, int button)
19
{
20
if (!GetGame().GetInputManager().IsUsingMouseAndKeyboard())
21
return false;
22
23
if (m_OnMapIconClick)
24
m_OnMapIconClick.Invoke();
25
26
return false;
27
}
28
29
//------------------------------------------------------------------------------------------------
30
override bool OnMouseEnter(Widget w, int x, int y)
31
{
32
Widget frame = m_MapUiTask.GetMapWidget().FindAnyWidget("Border");
33
34
if (frame)
35
{
36
frame.SetEnabled(true);
37
frame.SetOpacity(1);
38
}
39
40
GetGame().GetInputManager().AddActionListener(UIConstants.MENU_ACTION_SELECT, EActionTrigger.DOWN, ButtonPressed);
41
return false;
42
}
43
44
//------------------------------------------------------------------------------------------------
45
void ButtonPressed()
46
{
47
if (m_OnMapIconClick)
48
m_OnMapIconClick.Invoke();
49
}
50
//------------------------------------------------------------------------------------------------
51
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
52
{
53
Widget frame = m_MapUiTask.GetMapWidget().FindAnyWidget("Border");
54
if (frame)
55
{
56
frame.SetEnabled(false);
57
frame.SetOpacity(0);
58
}
59
60
GetGame().GetInputManager().RemoveActionListener(UIConstants.MENU_ACTION_SELECT, EActionTrigger.DOWN, ButtonPressed);
61
return false;
62
}
63
64
//------------------------------------------------------------------------------------------------
65
void SetRootWidgetHandler(SCR_MapUITask mapUiTask)
66
{
67
m_MapUiTask = mapUiTask;
68
}
69
*/
70
}
SCR_TaskAssignButton
Definition
SCR_TaskAssignButton.c:3
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
Obsolete
typedef Obsolete
Definition
HelicopterAutopilotHelperComponent.c:16
scripts
Game
Tasks
UI
SCR_TaskAssignButton.c
Generated by
1.17.0