4 [
Attribute(
desc:
"Display config, only header is used, labels are filled by action")]
14 editableUiInfo.GetEntityLabels(entityLabels);
15 return !entityLabels.IsEmpty();
21 override bool CanBeShown(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
23 return hoveredEntity !=
null && selectedEntities.Contains(hoveredEntity) && !SCR_EditableFactionComponent.Cast(hoveredEntity);
26 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
29 if (hoveredEntity && contentBrowserManager)
33 int itemIndex = contentBrowserManager.FindIndexOfInfo(uiInfo);
34 if (itemIndex == -1)
return;
36 int pageIndex = Math.AbsInt(itemIndex / contentBrowserManager.GetPageEntryCount());
41 array<EEditableEntityLabel> prefabLabels = {};
42 uiInfo.GetEntityLabels(prefabLabels);
44 resultState.SetLabels(prefabLabels);
45 string localizedEntityName = WidgetManager.Translate(uiInfo.GetName());
51 resultState.SetSearchString(localizedEntityName);
53 contentBrowserManager.OpenBrowserState(resultState, m_ContentBrowserConfig);