4 protected ref ScriptInvoker m_OnMapIconClick;
6 static const int VISIBLE = 1;
7 static const int NOT_VISIBLE = 0;
10 ScriptInvoker GetOnMapIconClick()
12 if (!m_OnMapIconClick)
13 m_OnMapIconClick =
new ScriptInvoker();
15 return m_OnMapIconClick;
19 override bool OnClick(Widget w,
int x,
int y,
int button)
22 m_OnMapIconClick.Invoke();
32 taskListUI.HandleTaskList(taskToFocus: m_MapUiTask.GetTask());
38 override bool OnMouseEnter(Widget w,
int x,
int y)
40 m_MapUiTask.UpdateFocusedTask();
42 ButtonWidget assignButton = ButtonWidget.Cast(m_MapUiTask.GetMapWidget().FindAnyWidget(
"TaskTitleButton"));
43 Widget assignees = Widget.Cast(m_MapUiTask.GetMapWidget().FindAnyWidget(
"Assignee"));
44 Widget iconHover = Widget.Cast(m_MapUiTask.GetMapWidget().FindAnyWidget(
"TaskIconHover"));
46 if (!assignButton || !assignees || !iconHover)
49 assignButton.SetVisible(
true);
51 assignees.SetEnabled(HasAssigneeBool());
52 assignees.SetOpacity(HasAssigneeInt());
54 iconHover.SetEnabled(
true);
57 GetGame().GetInputManager().AddActionListener(
"MenuSelect", EActionTrigger.DOWN, ButtonPressed);
63 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
65 GetGame().GetInputManager().RemoveActionListener(
"MenuSelect", EActionTrigger.DOWN, ButtonPressed);
73 m_OnMapIconClick.Invoke();
83 taskListUI.HandleTaskList(taskToFocus: m_MapUiTask.GetTask());
86 bool HasAssigneeBool()
92 if (task.GetAssigneeCount() == 0)
105 if (task.GetAssigneeCount() == 0)
114 m_MapUiTask = mapUiTask;