214 float textWidgetPosX, textWidgetPosY;
215 float textWidgetWidth, textWidgetHeight;
216 float dotPosX, dotPosY;
217 float dotWidth, dotHeight;
218 float drawPosX, drawPosY;
222 CanvasWidget canvasWidget = CanvasWidget.Cast(layoutRoot.FindAnyWidget(
"CanvasWidget_" + index));
223 canvasWidget.Clear();
228 for (
int i = 0; i <
m_TabScript.GetTabCount(); i++)
231 for (
int j = 0; j < 30; j++)
233 tabArray[i].Insert(NULL);
238 int controlMappingInfoCount = controlMappingInfo.Count();
239 for (i = 0; i < controlMappingInfoCount; i++)
246 for (
int l = 0; l < controlMappingInfoCount; l++)
255 if (!buttonMarkerGroupsUnfiltered.Contains(buttonName))
257 buttonMarkerGroupsUnfiltered.Insert(buttonName,
new array<int>);
258 buttonMarkerGroupsUnfiltered.Get(buttonName).Insert(textWidgetID);
262 buttonMarkerGroupsUnfiltered.Get(buttonName).Insert(textWidgetID);
267 for (l = 0; l < buttonMarkerGroupsUnfiltered.Count(); l++)
269 if (buttonMarkerGroupsUnfiltered.GetElement(l).Count() > 1)
271 string key = buttonMarkerGroupsUnfiltered.GetKey(l);
272 buttonMarkerGroups.Insert(buttonMarkerGroupsUnfiltered.GetKey(l), buttonMarkerGroupsUnfiltered.Get(key));
277 Widget xboxControlsImage = layoutRoot.FindAnyWidget(
"Markers_" + index);
280 Widget buttonMarkerWidget;
282 for (l = 0; l < tabArray[index].Count(); l++)
284 panelWidget = layoutRoot.FindAnyWidget(
"PanelWidget" + l);
285 if (tabArray[index][l] != NULL)
288 buttonMarkerWidget = layoutRoot.FindAnyWidget(
"button_marker_" + tabArray[index][l].m_ButtonName);
293 textWidget.SetText(tabArray[index][l].m_InfoText);
295 panelWidget.Show(
true);
296 panelWidget.Update();
298 if (!buttonMarkerGroups.Contains(tabArray[index][l].m_ButtonName))
300 panelWidget.GetScreenPos(textWidgetPosX, textWidgetPosY);
301 panelWidget.GetScreenSize(textWidgetWidth,textWidgetHeight);
303 buttonMarkerWidget.GetScreenPos(dotPosX, dotPosY);
304 buttonMarkerWidget.GetScreenSize(dotWidth, dotHeight);
306 drawPosY = textWidgetPosY + textWidgetHeight / 2;
310 drawPosX = textWidgetPosX + textWidgetWidth - 1;
314 drawPosX = textWidgetPosX;
317 canvasWidget.DrawLine(drawPosX, drawPosY, dotPosX + dotWidth / 2, drawPosY, lineThickness,
ARGBF(0.6, 1, 1, 1));
318 canvasWidget.DrawLine(dotPosX + dotWidth / 2, drawPosY, dotPosX + dotWidth / 2, dotPosY + dotHeight / 2, lineThickness,
ARGBF(0.6, 1, 1, 1));
323 panelWidget.Show(
false);
325 panelWidget.Update();
329 for (l = 0; l < buttonMarkerGroups.Count(); l++)
334 textWidgetHeight = 0;
335 float groupPointX = 0, groupPointY = 0;
336 float firstX = 0, firstY = 0;
338 array<int> element = buttonMarkerGroups.GetElement(l);
339 string keyName = buttonMarkerGroups.GetKey(l);
340 buttonMarkerWidget = layoutRoot.FindAnyWidget(
"button_marker_" + keyName);
342 int elementsCount = element.Count();
343 for (
int g = 0; g < elementsCount; g++)
345 panelWidget = layoutRoot.FindAnyWidget(
"PanelWidget" + element[g]);
347 panelWidget.GetScreenPos(textWidgetPosX, textWidgetPosY);
348 panelWidget.GetScreenSize(textWidgetWidth, textWidgetHeight);
354 firstX = textWidgetPosX + textWidgetWidth + branchOffset;
358 firstX = textWidgetPosX - branchOffset;
360 firstY = textWidgetPosY + textWidgetHeight/2;
364 groupPointX += textWidgetPosX;
365 groupPointY += textWidgetPosY;
369 canvasWidget.DrawLine(textWidgetPosX + textWidgetWidth - 1, textWidgetPosY + textWidgetHeight / 2, textWidgetPosX + textWidgetWidth + branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness,
ARGBF(0.6, 1, 1, 1));
373 canvasWidget.DrawLine(textWidgetPosX, textWidgetPosY + textWidgetHeight / 2, textWidgetPosX - branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness,
ARGBF(0.6, 1, 1, 1));
379 groupPointX = groupPointX / elementsCount + textWidgetWidth + branchOffset;
383 groupPointX = groupPointX / elementsCount - branchOffset;
386 groupPointY = groupPointY/elementsCount + textWidgetHeight/2;
388 buttonMarkerWidget.GetScreenPos(dotPosX, dotPosY);
389 buttonMarkerWidget.GetScreenSize(dotWidth, dotHeight);
391 canvasWidget.
DrawLine(groupPointX, groupPointY, dotPosX + dotWidth / 2, groupPointY, lineThickness,
ARGBF(0.6, 1, 1, 1));
392 canvasWidget.DrawLine(dotPosX + dotWidth / 2, groupPointY, dotPosX + dotWidth / 2, dotPosY, lineThickness,
ARGBF(0.6, 1, 1, 1));
396 canvasWidget.DrawLine(firstX, firstY, textWidgetPosX + textWidgetWidth + branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness,
ARGBF(0.6, 1, 1, 1));
400 canvasWidget.DrawLine(firstX, firstY, textWidgetPosX - branchOffset, textWidgetPosY + textWidgetHeight / 2, lineThickness,
ARGBF(0.6, 1, 1, 1));