Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_ContentBrowserEditorComponent Interface Reference

Management of placeable entities. More...

Inheritance diagram for SCR_ContentBrowserEditorComponent:
[legend]

Public Member Functions

ResourceName GetResourceNamePrefabID (int prefabID)
 Get prefab Resourcename of item with prefabID.
 
int GetFilteredPrefabID (int index)
 Get prefab ID of item at given index.
 
int GetFilteredPrefabCount ()
 Get prefab ID of item at given index.
 
bool AreFactionsShownOnContentCards ()
 
int FilterExtendedSlots ()
 Filters all prefab IDs that match the extended entity.
 
bool IsExtendedEntity (notnull SCR_EditableEntityComponent entity)
 
int GetValidBlackListedLabels (out notnull array< EEditableEntityLabel > validBlackListLabels)
 Returns a list of lables that are currently blacklisted and any enity with the label will not be displayed in the list nor will the filter show.
 
void FilterEntries ()
 Filter entries cached on component with current filters.
 
bool isMatchingToggledLabelsOfState (int savedStateIndex)
 
bool IsMatchingToggledLabels (notnull array< EEditableEntityLabel > entityLabels)
 Get if provided (entity) labels match current active selection, according to rules defined in config.
 
bool IsLabelActive (EEditableEntityLabel entityLabel)
 Get if passed entity label currently active.
 
bool IsAnyLabelActive ()
 Get if any label is currently active.
 
void SetLabel (EEditableEntityLabel entityLabel, bool active)
 Set label active.
 
void ResetAllLabels (bool setConfigData=true)
 Reset the set labels.
 
void GetActiveLabels (out notnull array< EEditableEntityLabel > activeLabels)
 
int GetActiveLabelCount ()
 
void GetLabelGroups (out notnull array< ref SCR_EditableEntityCoreLabelGroupSetting > labelGroups)
 
bool GetLabelGroupType (EEditableEntityLabel entityLabel, out EEditableEntityLabelGroup groupLabel)
 
int GetLabelGroupOrder (EEditableEntityLabelGroup groupLabel)
 Get the order of the given group type.
 
bool GetLabelsOfGroup (EEditableEntityLabelGroup labelGroupType, out notnull array< SCR_EditableEntityCoreLabelSetting > labels)
 
bool GetLabelUIInfo (EEditableEntityLabel entityLabel, out SCR_UIInfo uiInfo)
 
bool GetLabelUIInfoIfValid (EEditableEntityLabel entityLabel, EEditorMode currentMode, out SCR_UIInfo uiInfo)
 
void OrderLabels (inout notnull array< EEditableEntityLabel > activeLabels)
 Order given labels.
 
int GetLabelOrderInGroup (EEditableEntityLabel entityLabel)
 Get order of given label type in it's label group.
 
string GetLabelName (EEditableEntityLabel entityLabel)
 Get label name of given Label type.
 
void SetPageIndex (int pageIndex)
 Set current page index.
 
int GetPageIndex ()
 Get current page index.
 
void SetPageEntryCount (int pageEntryCount)
 
int GetPageEntryCount ()
 
void SetBrowserStateIndex (int index)
 Set the index of the Browser state (which is set by tabs in content browser)
 
int GetBrowserStateIndex ()
 Get the index of the Browser state (which is set by tabs in content browser)
 
void GetHiddenStateTabs (out notnull array< int > hiddenStateTabs)
 Get an array of all currently hidden state tabs.
 
void SetStateTabVisible (int tabIndex, bool setVisible)
 Makes sure that certain state tabs are shown or hidden.
 
int GetContentBrowserTabStates (out notnull array< SCR_EditorContentBrowserSaveStateDataUI > contentBrowserStates)
 Get list of all Browser content browser states.
 
SCR_EditorContentBrowserSaveStateData GetContentBrowserTabState (int index=-1)
 Get Browser content browser state by index.
 
string GetLastSearch ()
 Get Last search string.
 
string GetCurrentSearch ()
 Get current search string.
 
void SetCurrentSearch (string searchText)
 Set current search string.
 
void SetSaveStateTabsEnabled (bool enabled)
 Set save state tabs enabled.
 
bool CanSavePersistentBrowserStates ()
 Get can save persistent browser states.
 
ScriptInvoker GetOnLabelChanged ()
 Get on label changed event.
 
ScriptInvoker GetOnBrowserStatesSaved ()
 Event send when browser states are saved.
 
ScriptInvoker GetOnBrowserStatePreload ()
 Event send just before browser state is loaded.
 
ScriptInvoker GetOnBrowserStateLoaded ()
 Event send when browser state is loaded.
 
ScriptInvoker GetOnBrowserEntriesFiltered ()
 Event send when browser state done loading.
 
ScriptInvoker GetOnBrowserStateCleared ()
 Event send when browser state is cleared.
 
ScriptInvoker GetOnEnableSaveStateTabs ()
 Event send when browser state is cleared.
 
ScriptInvoker GetOnSearchConfirm ()
 Get on search confirm, sends over current search string.
 
ScriptInvoker GetOnStateTabVisibilityChanged ()
 Called when state tab visibility is changed.
 
void SetExtendedEntity (SCR_EditableEntityComponent extendedEntity)
 Set extended entity.
 
SCR_EditableEntityComponent GetExtendedEntity ()
 Get extended entity.
 
int GetInfoCount ()
 Get info for placeaable prefab with given index.
 
SCR_EditableEntityUIInfo GetInfo (int index)
 Get info for placeaable prefab with given index.
 
int FindIndexOfInfo (SCR_EditableEntityUIInfo info)
 Find index of given editable entity (info), used for find in content browser.
 
bool GetFirstAvailabeBudgetCost (int prefabID, out SCR_EntityBudgetValue budgetCost)
 
bool CanPlace (int prefabID, out notnull array< ref SCR_EntityBudgetValue > budgetCosts, out SCR_UIInfo blockingBudgetInfo, bool showNotification=false)
 
bool CanPlace (notnull array< ResourceName > prefabs, EEditableEntityType fallbackBudgetType=-1)
 If there is enough budget for the given list or Prefabs to spawn.
 
bool RefreshPreviewCost (int prefabID=-1)
 
bool OpenBrowserExtended (SCR_EditableEntityComponent extendedEntity, SCR_EditorContentBrowserDisplayConfig contentBrowserConfig=null)
 Start extending given entity.
 
bool OpenBrowser (int browserStateIndex=-1)
 Open content browser with preset labels.
 
bool OpenBrowserState (SCR_EditorContentBrowserSaveStateData saveState, SCR_EditorContentBrowserDisplayConfig displayConfig=null)
 Open content browser with external state.
 
bool OpenBrowserLabelConfig (SCR_EditorContentBrowserDisplayConfig contentBrowserConfig)
 Open content browser with label config Allows labels to be active on opening and label groups/labels to be hidden.
 
void SetBrowserState (int browserStateIndex=-1, bool saveCurrentState=false, bool clearConfigData=true)
 Set Browser State.
 
void SetCustomBrowserState (SCR_EditorContentBrowserSaveStateData state, bool clearConfigData=true)
 
void SetBrowserState (SCR_EditorContentBrowserDisplayConfig contentBrowserConfig, bool saveCurrentState=false)
 Set Browser State.
 
bool SaveBrowserState ()
 Save the current browser state eg: Active filter labels, search string and current page.
 
void AddRemoveLabelOfPersistentBrowserState (EEditableEntityLabel label, bool addLabel, int stateIndex=-1)
 Add or remove the given label.
 
void ResetBrowserState (bool clearConfigData)
 
void OnPlaceEntityServer (int prefabID, SCR_EditableEntityComponent entity)
 
void OnMenuClosed ()
 
SCR_EditorContentBrowserDisplayConfig GetContentBrowserDisplayConfig ()
 Get the set content browser config.
 
void SaveAllPersistentBrowserState ()
 
override void EOnEditorInit ()
 When the entity is created.
 
override void EOnEditorActivateServer ()
 When the component is activated (called on server)
 
override void EOnEditorDeactivateServer ()
 When the component is deactivated (called on server)
 
override void EOnEditorActivate ()
 When the component is activated.
 
override bool EOnEditorActivateAsync (int attempt)
 When the component is activated.
 
override void EOnEditorDeactivate ()
 When the component is deactivated.
 
- Public Member Functions inherited from SCR_BaseEditorComponent
sealed void OnInitBase ()
 
sealed void OnDeleteBase ()
 
sealed void OnRequestBase (bool isOpen)
 
sealed void OnOpenedBase ()
 
sealed void OnClosedBase ()
 
sealed void OnPreActivateBase ()
 
sealed void OnActivateBase ()
 
sealed bool OnActivateAsyncBase (int attempt)
 
sealed void OnPostActivateBase ()
 
sealed void OnDeactivateBase ()
 
sealed void OnPostDeactivateBase ()
 
sealed bool OnDeactivateAsyncBase (int attempt)
 
sealed void OnEffectBase (SCR_BaseEditorEffect effect)
 
SCR_EditorManagerEntity GetManager ()
 Get editor manager this component belongs to.
 
SCR_BaseEditorComponent FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false)
 Get the editor manager to which this component belongs.
 
EntityComponentPrefabData GetEditorComponentData ()
 Get prefab data of this component.
 
bool IsRemoved ()
 Check if the component is being deleted.
 
void ResetEditorComponent ()
 Reset values controlled by the component.
 
ScriptInvoker GetOnEffect ()
 Get event called when an effect is activated.
 
void InitServer ()
 
void InitOwner ()
 
override void OnPostInit (IEntity owner)
 
void SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_BaseEditorComponent ()
 

Static Public Member Functions

static bool OpenBrowserInstance (int browserStateIndex=-1)
 Open content browser.
 
static bool OpenBrowserInstance (SCR_EditorContentBrowserSaveStateData saveState)
 Open content browser with state.
 
static bool OpenBrowserLabelConfigInstance (SCR_EditorContentBrowserDisplayConfig contentBrowserConfig=null)
 Open content browser with label config Allows labels to be active on opening and label groups/labels to be hidden.
 
- Static Public Member Functions inherited from SCR_BaseEditorComponent
static Managed GetInstance (TypeName type, bool showError=false, bool modeFirst=false)
 Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).
 
static Managed GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false)
 Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).
 
static int GetAllInstances (TypeName type, out notnull array< Managed > outComponents)
 Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).
 

Protected Member Functions

SCR_EditableEntityCache FindExtendedEntityCache (ResourceName extendedEntityResource)
 
bool OpenBrowserMenu ()
 
void ClearBrowserState (bool clearConfigData)
 
void LoadBrowserState (int stateIndex, bool clearConfigData)
 
void LoadBrowserState (SCR_EditorContentBrowserSaveStateData state, bool clearConfigData)
 
bool GetConfigState (SCR_EditorContentBrowserDisplayConfig browserConfig, out SCR_EditorContentBrowserSaveStateData state)
 
void SetConfigLabels ()
 
void LoadAllPersistentBrowserState ()
 
- Protected Member Functions inherited from SCR_BaseEditorComponent
bool IsOnEditorManager ()
 
bool IsOwner ()
 
bool IsProxy ()
 
bool IsMaster ()
 
bool IsAdmin ()
 
SCR_BaseEditorComponent GetParentComponent ()
 
void SetParentComponent (SCR_BaseEditorComponent parent)
 
void SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
 
void EOnEditorDelete ()
 When the entity is destroyed.
 
void EOnEditorRequest (bool isOpen)
 When opening/closing request is sent to server.
 
void EOnEditorOpen ()
 When the editor is opened.
 
void EOnEditorClose ()
 When the editor is closed.
 
void EOnEditorPreActivate ()
 Before the component is activated.
 
void EOnEditorPostActivate ()
 When the component is activated, but after EOnEditorActivate() function was called in all components.
 
bool EOnEditorDeactivateAsync (int attempt)
 When the component is deactivated.
 
void EOnEditorPostDeactivate ()
 When the component is deactivated, but after the next mode is activated.
 
void EOnEditorDebug (array< string > debugTexts)
 Every frame while the editor is opened and debug menu is shown.
 
void EOnEffect (SCR_BaseEditorEffect effect)
 When an effect is created in reaction an an event.
 
void EOnEditorInitServer ()
 When the entity is created (called on server)
 
void EOnEditorDeleteServer ()
 When the entity is destroyed (called on server)
 
void EOnEditorOpenServer ()
 When the editor is opened (called on server)
 
void EOnEditorOpenServerCallback ()
 When the editor is opened (called on server after async loading finished on client)
 
void EOnEditorCloseServer ()
 When the editor is closed (called on server)
 
void EOnEditorCloseServerCallback ()
 When the editor is closed (called on server after async loading finished on client)
 

Protected Attributes

bool m_bShowFactionOnContentBrowserCards
 
bool m_bUsePersistentBrowserStates
 
ref array< ref SCR_EditorContentBrowserSaveStateDataUIm_aContentBrowserTabStates
 
ref array< EEditableEntityLabel > m_eBlackListedLabels
 
ref map< ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateDatam_mContentBrowserConfigStates = new map<ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateData>
 
ref set< ref SCR_EditableEntityCachem_aExtendedEntitiesCache = new set<ref SCR_EditableEntityCache>()
 
ref SCR_EditorContentBrowserDisplayConfig m_ContentBrowserConfig
 
ref array< ref SCR_EditableEntityCoreLabelGroupSettingm_LabelGroups = {}
 
ref array< int > m_aHiddenStateTabs = {}
 
ref array< int > m_aFilteredPrefabIDs = {}
 
ref array< string > m_aLocalizationKeys = {}
 
int m_iFilteredPrefabIDsCount
 
SCR_MenuEditorComponent m_EditorMenuManager
 
SCR_PlacingEditorComponent m_PlacingManager
 
SCR_PlacingEditorComponentClass m_PlacingManagerData
 
SCR_BudgetEditorComponent m_BudgetManager
 
SCR_PrefabsCacheEditorComponent m_PrefabsCache
 
ref array< ref SCR_EditableEntityUIInfom_aInfos
 
ref array< ResourceName > m_aAsyncPrefabs
 
int m_iAsyncIndex
 
int m_iBrowserStateIndex = 0
 
int m_iPageIndex
 
int m_iPageEntryCount = 15
 
string m_sCurrentSearchText
 
string m_sLastSearchText
 
bool m_bShowEntityBudgetCost
 
SCR_EditableEntityComponent m_ExtendedEntity
 
SCR_EditableEntityCore m_EntityCore
 
ref ScriptInvoker Event_OnLabelChanged = new ScriptInvoker
 
ref ScriptInvoker Event_OnSearchConfirm = new ScriptInvoker
 
ref ScriptInvoker Event_OnBrowserStatesSaved = new ScriptInvoker
 
ref ScriptInvoker Event_OnBrowserStatePreload = new ScriptInvoker
 
ref ScriptInvoker Event_OnBrowserStateLoaded = new ScriptInvoker
 
ref ScriptInvoker Event_OnBrowserEntriesFiltered = new ScriptInvoker
 
ref ScriptInvoker Event_OnBrowserStateCleared = new ScriptInvoker
 
ref ScriptInvoker Event_OnEnableSaveStateTabs = new ScriptInvoker
 
ref ScriptInvoker Event_OnStateTabVisibilityChanged = new ScriptInvoker
 
- Protected Attributes inherited from SCR_BaseEditorComponent
SCR_EditorBaseEntity m_Owner
 
SCR_EditorManagerEntity m_Manager
 
SCR_BaseEditorComponent m_Parent
 
RplComponent m_RplComponent
 

Static Protected Attributes

const int ASYNC_TICK_LENGTH = 16
 

Detailed Description

Management of placeable entities.

Member Function Documentation

◆ AddRemoveLabelOfPersistentBrowserState()

void SCR_ContentBrowserEditorComponent.AddRemoveLabelOfPersistentBrowserState ( EEditableEntityLabel  label,
bool  addLabel,
int  stateIndex = -1 
)

Add or remove the given label.

Parameters
labelLabel to add or remove
addLabelIf true will add the label. Else will remove
stateIndexIndex of state to add/remove label off. Set to -1 to add/remove label of all states

◆ AreFactionsShownOnContentCards()

bool SCR_ContentBrowserEditorComponent.AreFactionsShownOnContentCards ( )
Returns
Returns if faction should be shown on contentbrowser cards

◆ CanPlace() [1/2]

bool SCR_ContentBrowserEditorComponent.CanPlace ( int  prefabID,
out notnull array< ref SCR_EntityBudgetValue budgetCosts,
out SCR_UIInfo  blockingBudgetInfo,
bool  showNotification = false 
)

◆ CanPlace() [2/2]

bool SCR_ContentBrowserEditorComponent.CanPlace ( notnull array< ResourceName >  prefabs,
EEditableEntityType  fallbackBudgetType = -1 
)

If there is enough budget for the given list or Prefabs to spawn.

Parameters
prefabsPrefabs to get budget of
fallbackBudgetTypeIf the system fails to get the budget then if fallbackBudgetType is not -1 it will fall back and get the default budget of the given type
Returns
Returns true if can place, else returns false

◆ CanSavePersistentBrowserStates()

bool SCR_ContentBrowserEditorComponent.CanSavePersistentBrowserStates ( )

Get can save persistent browser states.

◆ ClearBrowserState()

void SCR_ContentBrowserEditorComponent.ClearBrowserState ( bool  clearConfigData)
protected

◆ EOnEditorActivate()

override void SCR_ContentBrowserEditorComponent.EOnEditorActivate ( )

When the component is activated.

Implements SCR_BaseEditorComponent.

◆ EOnEditorActivateAsync()

override bool SCR_ContentBrowserEditorComponent.EOnEditorActivateAsync ( int  attempt)

When the component is activated.

Asynchronous, can take multiple frames in case of complex operations.

Parameters
[in]attemptNumber of previous attempts to activate the component.
Returns
True if the component is activated, false if it isn't (another attempt will follow in the next frame).

Implements SCR_BaseEditorComponent.

◆ EOnEditorActivateServer()

override void SCR_ContentBrowserEditorComponent.EOnEditorActivateServer ( )

When the component is activated (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorDeactivate()

override void SCR_ContentBrowserEditorComponent.EOnEditorDeactivate ( )

When the component is deactivated.

Implements SCR_BaseEditorComponent.

◆ EOnEditorDeactivateServer()

override void SCR_ContentBrowserEditorComponent.EOnEditorDeactivateServer ( )

When the component is deactivated (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorInit()

override void SCR_ContentBrowserEditorComponent.EOnEditorInit ( )

When the entity is created.

Implements SCR_BaseEditorComponent.

◆ FilterEntries()

void SCR_ContentBrowserEditorComponent.FilterEntries ( )

Filter entries cached on component with current filters.

Returns
bool True when provided labels match active labels

◆ FilterExtendedSlots()

int SCR_ContentBrowserEditorComponent.FilterExtendedSlots ( )

Filters all prefab IDs that match the extended entity.

Returns
int Amount of Prefab IDs that got filtered.

◆ FindExtendedEntityCache()

SCR_EditableEntityCache SCR_ContentBrowserEditorComponent.FindExtendedEntityCache ( ResourceName  extendedEntityResource)
protected

◆ FindIndexOfInfo()

int SCR_ContentBrowserEditorComponent.FindIndexOfInfo ( SCR_EditableEntityUIInfo  info)

Find index of given editable entity (info), used for find in content browser.

Parameters
infoEditableEntityInfo of the entity
Returns
int index of editable entity in content browser, -1 if not found

◆ GetActiveLabelCount()

int SCR_ContentBrowserEditorComponent.GetActiveLabelCount ( )

◆ GetActiveLabels()

void SCR_ContentBrowserEditorComponent.GetActiveLabels ( out notnull array< EEditableEntityLabel >  activeLabels)

◆ GetBrowserStateIndex()

int SCR_ContentBrowserEditorComponent.GetBrowserStateIndex ( )

Get the index of the Browser state (which is set by tabs in content browser)

Returns
Current Browser state index

◆ GetConfigState()

bool SCR_ContentBrowserEditorComponent.GetConfigState ( SCR_EditorContentBrowserDisplayConfig  browserConfig,
out SCR_EditorContentBrowserSaveStateData  state 
)
protected

◆ GetContentBrowserDisplayConfig()

SCR_EditorContentBrowserDisplayConfig SCR_ContentBrowserEditorComponent.GetContentBrowserDisplayConfig ( )

Get the set content browser config.

Returns
SCR_EditorContentBrowserDisplayConfig config

◆ GetContentBrowserTabState()

SCR_EditorContentBrowserSaveStateData SCR_ContentBrowserEditorComponent.GetContentBrowserTabState ( int  index = -1)

Get Browser content browser state by index.

Parameters
Indexof state, use -1 to get current tab state
Returns
State

◆ GetContentBrowserTabStates()

int SCR_ContentBrowserEditorComponent.GetContentBrowserTabStates ( out notnull array< SCR_EditorContentBrowserSaveStateDataUI contentBrowserStates)

Get list of all Browser content browser states.

Parameters
[out]Listof all states
Returns
Count of states

◆ GetCurrentSearch()

string SCR_ContentBrowserEditorComponent.GetCurrentSearch ( )

Get current search string.

Returns
Current search string

◆ GetExtendedEntity()

SCR_EditableEntityComponent SCR_ContentBrowserEditorComponent.GetExtendedEntity ( )

Get extended entity.

The value gets erased during retrieval.

Returns
Extended entity

◆ GetFilteredPrefabCount()

int SCR_ContentBrowserEditorComponent.GetFilteredPrefabCount ( )

Get prefab ID of item at given index.

Parameters
indexIndex of entry in filtered list/grid
Returns
int Prefab ID of entity at index

◆ GetFilteredPrefabID()

int SCR_ContentBrowserEditorComponent.GetFilteredPrefabID ( int  index)

Get prefab ID of item at given index.

Parameters
indexIndex of entry in filtered list/grid
Returns
int Prefab ID of entity at index

◆ GetFirstAvailabeBudgetCost()

bool SCR_ContentBrowserEditorComponent.GetFirstAvailabeBudgetCost ( int  prefabID,
out SCR_EntityBudgetValue  budgetCost 
)

◆ GetHiddenStateTabs()

void SCR_ContentBrowserEditorComponent.GetHiddenStateTabs ( out notnull array< int >  hiddenStateTabs)

Get an array of all currently hidden state tabs.

Parameters
[out]hiddenStateTabsArray of hidden state tabs

◆ GetInfo()

SCR_EditableEntityUIInfo SCR_ContentBrowserEditorComponent.GetInfo ( int  index)

Get info for placeaable prefab with given index.

Infos are store dint he same order as prefabs from SCR_PlacingEditorComponentClass.

Parameters
Prefabindex
Returns
UI info

◆ GetInfoCount()

int SCR_ContentBrowserEditorComponent.GetInfoCount ( )

Get info for placeaable prefab with given index.

Returns
Total UI info count

◆ GetLabelGroupOrder()

int SCR_ContentBrowserEditorComponent.GetLabelGroupOrder ( EEditableEntityLabelGroup  groupLabel)

Get the order of the given group type.

Parameters
groupLabelgiven group type
Returns
order

◆ GetLabelGroups()

void SCR_ContentBrowserEditorComponent.GetLabelGroups ( out notnull array< ref SCR_EditableEntityCoreLabelGroupSetting labelGroups)

◆ GetLabelGroupType()

bool SCR_ContentBrowserEditorComponent.GetLabelGroupType ( EEditableEntityLabel  entityLabel,
out EEditableEntityLabelGroup  groupLabel 
)

◆ GetLabelName()

string SCR_ContentBrowserEditorComponent.GetLabelName ( EEditableEntityLabel  entityLabel)

Get label name of given Label type.

Returns
Label name

◆ GetLabelOrderInGroup()

int SCR_ContentBrowserEditorComponent.GetLabelOrderInGroup ( EEditableEntityLabel  entityLabel)

Get order of given label type in it's label group.

Returns
Label order

◆ GetLabelsOfGroup()

bool SCR_ContentBrowserEditorComponent.GetLabelsOfGroup ( EEditableEntityLabelGroup  labelGroupType,
out notnull array< SCR_EditableEntityCoreLabelSetting labels 
)

◆ GetLabelUIInfo()

bool SCR_ContentBrowserEditorComponent.GetLabelUIInfo ( EEditableEntityLabel  entityLabel,
out SCR_UIInfo  uiInfo 
)

◆ GetLabelUIInfoIfValid()

bool SCR_ContentBrowserEditorComponent.GetLabelUIInfoIfValid ( EEditableEntityLabel  entityLabel,
EEditorMode  currentMode,
out SCR_UIInfo  uiInfo 
)

◆ GetLastSearch()

string SCR_ContentBrowserEditorComponent.GetLastSearch ( )

Get Last search string.

Returns
Last search string

◆ GetOnBrowserEntriesFiltered()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnBrowserEntriesFiltered ( )

Event send when browser state done loading.

Returns
Script invoker

◆ GetOnBrowserStateCleared()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnBrowserStateCleared ( )

Event send when browser state is cleared.

Returns
Script invoker

◆ GetOnBrowserStateLoaded()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnBrowserStateLoaded ( )

Event send when browser state is loaded.

Returns
Script invoker

◆ GetOnBrowserStatePreload()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnBrowserStatePreload ( )

Event send just before browser state is loaded.

Returns
Script invoker

◆ GetOnBrowserStatesSaved()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnBrowserStatesSaved ( )

Event send when browser states are saved.

Returns
Script invoker

◆ GetOnEnableSaveStateTabs()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnEnableSaveStateTabs ( )

Event send when browser state is cleared.

Returns
Script invoker

◆ GetOnLabelChanged()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnLabelChanged ( )

Get on label changed event.

Returns
OnLabelChanged ScriptInvoker

◆ GetOnSearchConfirm()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnSearchConfirm ( )

Get on search confirm, sends over current search string.

Returns
Script invoker

◆ GetOnStateTabVisibilityChanged()

ScriptInvoker SCR_ContentBrowserEditorComponent.GetOnStateTabVisibilityChanged ( )

Called when state tab visibility is changed.

Returns
Script invoker

◆ GetPageEntryCount()

int SCR_ContentBrowserEditorComponent.GetPageEntryCount ( )

◆ GetPageIndex()

int SCR_ContentBrowserEditorComponent.GetPageIndex ( )

Get current page index.

Returns
Current page index

◆ GetResourceNamePrefabID()

ResourceName SCR_ContentBrowserEditorComponent.GetResourceNamePrefabID ( int  prefabID)

Get prefab Resourcename of item with prefabID.

Parameters
PrefabIDof item
Returns
ResourceName prefab of given ID

◆ GetValidBlackListedLabels()

int SCR_ContentBrowserEditorComponent.GetValidBlackListedLabels ( out notnull array< EEditableEntityLabel >  validBlackListLabels)

Returns a list of lables that are currently blacklisted and any enity with the label will not be displayed in the list nor will the filter show.

Parameters
[out]validBlackListLabelsList of blacklisted labels
Returns
int Count of blacklisted labels

◆ IsAnyLabelActive()

bool SCR_ContentBrowserEditorComponent.IsAnyLabelActive ( )

Get if any label is currently active.

Returns
bool True when at least one label is active

◆ IsExtendedEntity()

bool SCR_ContentBrowserEditorComponent.IsExtendedEntity ( notnull SCR_EditableEntityComponent  entity)

◆ IsLabelActive()

bool SCR_ContentBrowserEditorComponent.IsLabelActive ( EEditableEntityLabel  entityLabel)

Get if passed entity label currently active.

Parameters
EEditableEntityLabelenum value
Returns
bool True when label is active

◆ IsMatchingToggledLabels()

bool SCR_ContentBrowserEditorComponent.IsMatchingToggledLabels ( notnull array< EEditableEntityLabel >  entityLabels)

Get if provided (entity) labels match current active selection, according to rules defined in config.

Returns
bool True when provided labels match active labels

◆ isMatchingToggledLabelsOfState()

bool SCR_ContentBrowserEditorComponent.isMatchingToggledLabelsOfState ( int  savedStateIndex)

◆ LoadAllPersistentBrowserState()

void SCR_ContentBrowserEditorComponent.LoadAllPersistentBrowserState ( )
protected

◆ LoadBrowserState() [1/2]

void SCR_ContentBrowserEditorComponent.LoadBrowserState ( int  stateIndex,
bool  clearConfigData 
)
protected

◆ LoadBrowserState() [2/2]

void SCR_ContentBrowserEditorComponent.LoadBrowserState ( SCR_EditorContentBrowserSaveStateData  state,
bool  clearConfigData 
)
protected

◆ OnMenuClosed()

void SCR_ContentBrowserEditorComponent.OnMenuClosed ( )

◆ OnPlaceEntityServer()

void SCR_ContentBrowserEditorComponent.OnPlaceEntityServer ( int  prefabID,
SCR_EditableEntityComponent  entity 
)

◆ OpenBrowser()

bool SCR_ContentBrowserEditorComponent.OpenBrowser ( int  browserStateIndex = -1)

Open content browser with preset labels.

Parameters
browserStateIndexThe state that needs to be loaded upon opening. -1 to use lasted saved state
Returns
True if opened

◆ OpenBrowserExtended()

bool SCR_ContentBrowserEditorComponent.OpenBrowserExtended ( SCR_EditableEntityComponent  extendedEntity,
SCR_EditorContentBrowserDisplayConfig  contentBrowserConfig = null 
)

Start extending given entity.

Content browser will be opened, showing only entities which fir the extended entity. Selecting one will instantly place it.

Parameters
extendedEntityExtended entity
configwith label data
Returns
True if opened

◆ OpenBrowserInstance() [1/2]

static bool SCR_ContentBrowserEditorComponent.OpenBrowserInstance ( int  browserStateIndex = -1)
static

Open content browser.

Parameters
browserStateIndexThe state that needs to be loaded upon opening. -1 to use lasted saved state
Returns
True if opened

◆ OpenBrowserInstance() [2/2]

static bool SCR_ContentBrowserEditorComponent.OpenBrowserInstance ( SCR_EditorContentBrowserSaveStateData  saveState)
static

Open content browser with state.

Parameters
browserStateIndexThe state that needs to be loaded upon opening. -1 to use lasted saved state
Returns
True if opened

◆ OpenBrowserLabelConfig()

bool SCR_ContentBrowserEditorComponent.OpenBrowserLabelConfig ( SCR_EditorContentBrowserDisplayConfig  contentBrowserConfig)

Open content browser with label config Allows labels to be active on opening and label groups/labels to be hidden.

Parameters
configwith label data
Returns
True if opened

◆ OpenBrowserLabelConfigInstance()

static bool SCR_ContentBrowserEditorComponent.OpenBrowserLabelConfigInstance ( SCR_EditorContentBrowserDisplayConfig  contentBrowserConfig = null)
static

Open content browser with label config Allows labels to be active on opening and label groups/labels to be hidden.

Parameters
configwith label data
Returns
True if opened

◆ OpenBrowserMenu()

bool SCR_ContentBrowserEditorComponent.OpenBrowserMenu ( )
protected

◆ OpenBrowserState()

bool SCR_ContentBrowserEditorComponent.OpenBrowserState ( SCR_EditorContentBrowserSaveStateData  saveState,
SCR_EditorContentBrowserDisplayConfig  displayConfig = null 
)

Open content browser with external state.

Parameters
browserStateIndexThe state that needs to be loaded upon opening. -1 to use lasted saved state
Returns
True if opened

◆ OrderLabels()

void SCR_ContentBrowserEditorComponent.OrderLabels ( inout notnull array< EEditableEntityLabel >  activeLabels)

Order given labels.

Using group order and label order

Parameters
[in,out]labelsthat need to be ordered

◆ RefreshPreviewCost()

bool SCR_ContentBrowserEditorComponent.RefreshPreviewCost ( int  prefabID = -1)

◆ ResetAllLabels()

void SCR_ContentBrowserEditorComponent.ResetAllLabels ( bool  setConfigData = true)

Reset the set labels.

Parameters
setConfigDataif true and applicable will set config data hidding certain labels and setting labels active

◆ ResetBrowserState()

void SCR_ContentBrowserEditorComponent.ResetBrowserState ( bool  clearConfigData)

◆ SaveAllPersistentBrowserState()

void SCR_ContentBrowserEditorComponent.SaveAllPersistentBrowserState ( )

◆ SaveBrowserState()

bool SCR_ContentBrowserEditorComponent.SaveBrowserState ( )

Save the current browser state eg: Active filter labels, search string and current page.

Parameters
clearBrowserStateif should also clear the browser for when the browser stays open and a new state is given
Returns
True if succesfully saved

◆ SetBrowserState() [1/2]

void SCR_ContentBrowserEditorComponent.SetBrowserState ( int  browserStateIndex = -1,
bool  saveCurrentState = false,
bool  clearConfigData = true 
)

Set Browser State.

Parameters
browserStateIndexindex of state to set
saveCurrentStatewether or not the current state should be saved

◆ SetBrowserState() [2/2]

void SCR_ContentBrowserEditorComponent.SetBrowserState ( SCR_EditorContentBrowserDisplayConfig  contentBrowserConfig,
bool  saveCurrentState = false 
)

Set Browser State.

Parameters
contentBrowserConfigconfig of state to set
saveCurrentStatewether or not the current state should be saved

◆ SetBrowserStateIndex()

void SCR_ContentBrowserEditorComponent.SetBrowserStateIndex ( int  index)

Set the index of the Browser state (which is set by tabs in content browser)

Parameters
NewIndex

◆ SetConfigLabels()

void SCR_ContentBrowserEditorComponent.SetConfigLabels ( )
protected

◆ SetCurrentSearch()

void SCR_ContentBrowserEditorComponent.SetCurrentSearch ( string  searchText)

Set current search string.

Parameters
searchTextsearch string to save

◆ SetCustomBrowserState()

void SCR_ContentBrowserEditorComponent.SetCustomBrowserState ( SCR_EditorContentBrowserSaveStateData  state,
bool  clearConfigData = true 
)

◆ SetExtendedEntity()

void SCR_ContentBrowserEditorComponent.SetExtendedEntity ( SCR_EditableEntityComponent  extendedEntity)

Set extended entity.

Upon next opening, the asset browser will show only prefabs which extend the entity.

Parameters
extendedEntityExtended entity

◆ SetLabel()

void SCR_ContentBrowserEditorComponent.SetLabel ( EEditableEntityLabel  entityLabel,
bool  active 
)

Set label active.

Parameters
EEditableEntityLabelenum value
boolset active state

◆ SetPageEntryCount()

void SCR_ContentBrowserEditorComponent.SetPageEntryCount ( int  pageEntryCount)

◆ SetPageIndex()

void SCR_ContentBrowserEditorComponent.SetPageIndex ( int  pageIndex)

Set current page index.

Parameters
NewIndex

◆ SetSaveStateTabsEnabled()

void SCR_ContentBrowserEditorComponent.SetSaveStateTabsEnabled ( bool  enabled)

Set save state tabs enabled.

Parameters
trueto set enabled

◆ SetStateTabVisible()

void SCR_ContentBrowserEditorComponent.SetStateTabVisible ( int  tabIndex,
bool  setVisible 
)

Makes sure that certain state tabs are shown or hidden.

Parameters
tabIndexindex of state tab
setVisibleIf should be hidden or not

Member Data Documentation

◆ ASYNC_TICK_LENGTH

const int SCR_ContentBrowserEditorComponent.ASYNC_TICK_LENGTH = 16
staticprotected

◆ Event_OnBrowserEntriesFiltered

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnBrowserEntriesFiltered = new ScriptInvoker
protected

◆ Event_OnBrowserStateCleared

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnBrowserStateCleared = new ScriptInvoker
protected

◆ Event_OnBrowserStateLoaded

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnBrowserStateLoaded = new ScriptInvoker
protected

◆ Event_OnBrowserStatePreload

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnBrowserStatePreload = new ScriptInvoker
protected

◆ Event_OnBrowserStatesSaved

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnBrowserStatesSaved = new ScriptInvoker
protected

◆ Event_OnEnableSaveStateTabs

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnEnableSaveStateTabs = new ScriptInvoker
protected

◆ Event_OnLabelChanged

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnLabelChanged = new ScriptInvoker
protected

◆ Event_OnSearchConfirm

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnSearchConfirm = new ScriptInvoker
protected

◆ Event_OnStateTabVisibilityChanged

ref ScriptInvoker SCR_ContentBrowserEditorComponent.Event_OnStateTabVisibilityChanged = new ScriptInvoker
protected

◆ m_aAsyncPrefabs

ref array<ResourceName> SCR_ContentBrowserEditorComponent.m_aAsyncPrefabs
protected

◆ m_aContentBrowserTabStates

ref array<ref SCR_EditorContentBrowserSaveStateDataUI> SCR_ContentBrowserEditorComponent.m_aContentBrowserTabStates
protected

◆ m_aExtendedEntitiesCache

ref set<ref SCR_EditableEntityCache> SCR_ContentBrowserEditorComponent.m_aExtendedEntitiesCache = new set<ref SCR_EditableEntityCache>()
protected

◆ m_aFilteredPrefabIDs

ref array<int> SCR_ContentBrowserEditorComponent.m_aFilteredPrefabIDs = {}
protected

◆ m_aHiddenStateTabs

ref array<int> SCR_ContentBrowserEditorComponent.m_aHiddenStateTabs = {}
protected

◆ m_aInfos

ref array<ref SCR_EditableEntityUIInfo> SCR_ContentBrowserEditorComponent.m_aInfos
protected

◆ m_aLocalizationKeys

ref array<string> SCR_ContentBrowserEditorComponent.m_aLocalizationKeys = {}
protected

◆ m_bShowEntityBudgetCost

bool SCR_ContentBrowserEditorComponent.m_bShowEntityBudgetCost
protected

◆ m_bShowFactionOnContentBrowserCards

bool SCR_ContentBrowserEditorComponent.m_bShowFactionOnContentBrowserCards
protected

◆ m_BudgetManager

SCR_BudgetEditorComponent SCR_ContentBrowserEditorComponent.m_BudgetManager
protected

◆ m_bUsePersistentBrowserStates

bool SCR_ContentBrowserEditorComponent.m_bUsePersistentBrowserStates
protected

◆ m_ContentBrowserConfig

ref SCR_EditorContentBrowserDisplayConfig SCR_ContentBrowserEditorComponent.m_ContentBrowserConfig
protected

◆ m_eBlackListedLabels

ref array<EEditableEntityLabel> SCR_ContentBrowserEditorComponent.m_eBlackListedLabels
protected

◆ m_EditorMenuManager

SCR_MenuEditorComponent SCR_ContentBrowserEditorComponent.m_EditorMenuManager
protected

◆ m_EntityCore

SCR_EditableEntityCore SCR_ContentBrowserEditorComponent.m_EntityCore
protected

◆ m_ExtendedEntity

SCR_EditableEntityComponent SCR_ContentBrowserEditorComponent.m_ExtendedEntity
protected

◆ m_iAsyncIndex

int SCR_ContentBrowserEditorComponent.m_iAsyncIndex
protected

◆ m_iBrowserStateIndex

int SCR_ContentBrowserEditorComponent.m_iBrowserStateIndex = 0
protected

◆ m_iFilteredPrefabIDsCount

int SCR_ContentBrowserEditorComponent.m_iFilteredPrefabIDsCount
protected

◆ m_iPageEntryCount

int SCR_ContentBrowserEditorComponent.m_iPageEntryCount = 15
protected

◆ m_iPageIndex

int SCR_ContentBrowserEditorComponent.m_iPageIndex
protected

◆ m_LabelGroups

ref array<ref SCR_EditableEntityCoreLabelGroupSetting> SCR_ContentBrowserEditorComponent.m_LabelGroups = {}
protected

◆ m_mContentBrowserConfigStates

ref map<ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateData> SCR_ContentBrowserEditorComponent.m_mContentBrowserConfigStates = new map<ref SCR_EditorContentBrowserDisplayConfig, ref SCR_EditorContentBrowserSaveStateData>
protected

◆ m_PlacingManager

SCR_PlacingEditorComponent SCR_ContentBrowserEditorComponent.m_PlacingManager
protected

◆ m_PlacingManagerData

SCR_PlacingEditorComponentClass SCR_ContentBrowserEditorComponent.m_PlacingManagerData
protected

◆ m_PrefabsCache

SCR_PrefabsCacheEditorComponent SCR_ContentBrowserEditorComponent.m_PrefabsCache
protected

◆ m_sCurrentSearchText

string SCR_ContentBrowserEditorComponent.m_sCurrentSearchText
protected

◆ m_sLastSearchText

string SCR_ContentBrowserEditorComponent.m_sLastSearchText
protected

The documentation for this interface was generated from the following file: