DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ BuildContextMenu()

void ScriptedWidgetEventHandler::BuildContextMenu ( notnull EntityAI entity,
notnull Widget rootWidget,
Class target )
inlineprivate

См. определение в файле ContextMenu.c строка 256

257 {
258 Clear();
259
260 TSelectableActionInfoArrayEx customActions = new TSelectableActionInfoArrayEx();
261 entity.GetDebugActions(customActions);
262
263 int actionsCount = customActions.Count();
264 for (int i = 0; i < customActions.Count(); i++)
265 {
266 TSelectableActionInfoWithColor actionInfo = TSelectableActionInfoWithColor.Cast(customActions.Get(i));
267 if (actionInfo)
268 {
269 int actionId = actionInfo.param2;
270 int textColor = actionInfo.param4;
271 string actionText = actionInfo.param3;
272
273 if (actionId == EActions.SEPARATOR)
274 AddEx(actionText, textColor, null, "", null);
275 else
276 AddEx(actionText, textColor, target, "OnSelectAction", new Param3<EntityAI, int, int>(entity, actionId, textColor));
277 }
278 }
279 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Определения EntityAI.c:97
EActions
Определения EActions.c:2
void Clear()
Определения ContextMenu.c:232
void AddEx(string label, int labelColor, Class obj, string funcName, Param params)
Определения ContextMenu.c:183

Перекрестные ссылки AddEx() и Clear().