Arma Reforger Script API
|
Public Member Functions | |
void | SetEntityUnderCursor (SCR_EditableEntityComponent entity, bool isDelegate=false) |
Set which entity is under cursor. | |
SCR_EditableEntityComponent | GetEntityUnderCursor (out bool isDelegate=false) |
Get entity under cursor. | |
SCR_EditableEntityComponent | GetInteractiveEntityUnderCursor () |
Get interactive entity under cursor (e.g., one which can be selected) | |
SCR_EditableEntityComponent | GetEntityUnderCursorCandidate (out bool isDelegate=false) |
Get candidate entity under cursor. | |
void | SetEntityUnderCursorEnabled (bool enabled) |
Set if the entity under cursor can be assigned. | |
bool | GetEntityUnderCursorEnabled () |
Get if the entity under cursor can be assigned. | |
bool | IsDelegate () |
Check if the entity under cursor is represented by a delegate (e.g., icon) | |
override void | EOnEditorFrame (float timeSlice) |
Every frame while the editor is opened. | |
override void | EOnEditorActivate () |
When the editor is opened (before cached array is intialized) | |
Public Member Functions inherited from SCR_BaseEditableEntityFilter | |
void | InitVariables (SCR_EntitiesManagerEditorComponent manager, SCR_BaseEditableEntityFilter predecessor) |
EEditableEntityState | GetState () |
Get entity state this component is managing. | |
string | GetStateName () |
Get name of the entity state this component is managing. | |
EEditableEntityState | GetPredecessorState () |
Get entity state of the component which preceeds this one. | |
SCR_BaseEditableEntityFilter | GetPredecessor () |
Get component which preceeds this one. | |
EEditableEntityFilterAutoAdd | GetAutoAdd () |
Check if entities can be registered automatically based on predecessor component. | |
int | GetEntities (out set< SCR_EditableEntityComponent > entities, bool includeChildren=false, bool evaluate=true) |
Get entities managed by this filter. | |
int | GetEntitiesCount () |
Get number of cached entities. | |
bool | IsEmpty () |
Check if the filter contains any entities. | |
SCR_EditableEntityComponent | GetFirstEntity () |
Get the first cached entity. | |
bool | Contains (SCR_EditableEntityComponent entity) |
Check if given entity is among cached entities. | |
ScriptInvokerBase< SCR_BaseEditableEntityFilter_OnChange > | GetOnChanged () |
Get script invoker which is triggered every time some entities are added or removed. | |
void | Log () |
Print all cached entities to the log. | |
void | OnFrameBase (float timeSlice) |
void | OnActivateBase () |
void | OnDeactivateBase () |
bool | Add (SCR_EditableEntityComponent entityInsert, bool onlyDirect=false) |
Register given entity. | |
bool | Add (notnull set< SCR_EditableEntityComponent > entitiesInsert, bool onlyDirect=false) |
Register multiple entities. | |
bool | Remove (SCR_EditableEntityComponent entityRemove, bool onlyDirect=false) |
Unregister given entity. | |
bool | Remove (notnull set< SCR_EditableEntityComponent > entitiesRemove, bool onlyDirect=false) |
Unregister multiple entities. | |
bool | Toggle (SCR_EditableEntityComponent entity, bool onlyDirect=false) |
Toggle state of given entity, i.e., register it if it's unregistered and unregister it if it's registered. | |
bool | Toggle (notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect=false) |
Toggle state of given entities, i.e., register them if they're unregistered and unregister them if they're registered. | |
bool | Replace (SCR_EditableEntityComponent entityInsert, bool onlyDirect=false, bool keepExisting=false) |
Replace cached array with given entity. | |
bool | Replace (set< SCR_EditableEntityComponent > entitiesInsert, bool onlyDirect=false, bool keepExisting=false) |
Replace cached array with entities. | |
bool | Set (SCR_EditableEntityComponent entityInsert, SCR_EditableEntityComponent entityRemove, bool onlyDirect=false) |
Register and unregister entities in one go. | |
bool | Set (set< SCR_EditableEntityComponent > entitiesInsert, set< SCR_EditableEntityComponent > entitiesRemove, bool onlyDirect=false) |
Register and unregister entities in one go. | |
bool | SetFromPredecessor () |
Fill the list from the predecessor. | |
bool | Validate (SCR_EditableEntityComponent entity) |
If the entity is added to the filter, check if its condition is still valid. | |
bool | Clear () |
Clear cached array. | |
bool | Copy (SCR_BaseEditableEntityFilter filter, bool onlyDirect=false) |
Copy the list of registered entities from another filter. | |
bool | CanAdd (SCR_EditableEntityComponent entity) |
Check if the entity meets condition for this entity state. | |
Protected Member Functions | |
void | UpdateEntityUnderCursor () |
Protected Member Functions inherited from SCR_BaseEditableEntityFilter | |
int | GetEntitiesPointer (out set< SCR_EditableEntityComponent > entities) |
SCR_EditableEntityComponent | GetParentBelowCurrentLayer (SCR_EditableEntityComponent entity) |
sealed SCR_EntitiesManagerEditorComponent | GetManager () |
sealed SCR_EditableEntityCore | GetCore () |
void | InitEntities () |
void | OnChanged (set< SCR_EditableEntityComponent > entitiesInsert, set< SCR_EditableEntityComponent > entitiesRemove) |
void | OnChanged () |
sealed void | InsertChildren (out set< SCR_EditableEntityComponent > entities) |
sealed bool | AddToArray (SCR_EditableEntityComponent entity, out bool isChange, bool returnWhenExists=false) |
sealed bool | RemoveFromArray (SCR_EditableEntityComponent entity, out bool isChange) |
void | EOnEditorDeactivate () |
When the editor is closed (after cached array is destroyed) | |
Additional Inherited Members | |
Static Public Member Functions inherited from SCR_BaseEditableEntityFilter | |
static SCR_BaseEditableEntityFilter | GetInstance (EEditableEntityState state, bool showError=false) |
Get current filter instance. | |
static SCR_EditableEntityComponent | GetFirstEntity (EEditableEntityState state) |
Get first entity of given filter type. | |
static int | GetEnititiesStatic (out set< SCR_EditableEntityComponent > entities, EEditableEntityState state, bool includeChildren=false, bool evaluate=true) |
Get first entity of given filter type. | |
Protected Attributes inherited from SCR_BaseEditableEntityFilter | |
EEditableEntityState | m_State |
EEditableEntityState | m_PredecessorState |
EEditableEntityFilterAutoAdd | m_bAutoAdd |
bool | m_bSkipIgnored |
bool | m_bOnlyInteractive |
SCR_EditableEntityCore | m_Core |
SCR_EntitiesManagerEditorComponent | m_Manager |
SCR_BaseEditableEntityFilter | m_Predecessor |
ref set< SCR_EditableEntityComponent > | m_Entities |
int | m_iEntitiesCount |
string | m_sStateName = "N/A" |
ref ScriptInvokerBase< SCR_BaseEditableEntityFilter_OnChange > | m_OnChange = new ScriptInvokerBase<SCR_BaseEditableEntityFilter_OnChange>() |
override void SCR_HoverEditableEntityFilter.EOnEditorActivate | ( | ) |
When the editor is opened (before cached array is intialized)
Implements SCR_BaseEditableEntityFilter.
override void SCR_HoverEditableEntityFilter.EOnEditorFrame | ( | float | timeSlice | ) |
Every frame while the editor is opened.
Implements SCR_BaseEditableEntityFilter.
SCR_EditableEntityComponent SCR_HoverEditableEntityFilter.GetEntityUnderCursor | ( | out bool | isDelegate = false | ) |
Get entity under cursor.
[out] | isDelegate | True if the entity under cursor is represented by a delegate (e.g., icon) |
SCR_EditableEntityComponent SCR_HoverEditableEntityFilter.GetEntityUnderCursorCandidate | ( | out bool | isDelegate = false | ) |
Get candidate entity under cursor.
Multiple systems can set entity under cursor each frame, and the final one is assigned at the end of the frame. This is useful for checking of a candidate already exists, so low priority candidate would be ignored.
[out] | isDelegate | True if the entity under cursor candidate is represented by a delegate (e.g., icon) |
bool SCR_HoverEditableEntityFilter.GetEntityUnderCursorEnabled | ( | ) |
Get if the entity under cursor can be assigned.
SCR_EditableEntityComponent SCR_HoverEditableEntityFilter.GetInteractiveEntityUnderCursor | ( | ) |
Get interactive entity under cursor (e.g., one which can be selected)
bool SCR_HoverEditableEntityFilter.IsDelegate | ( | ) |
Check if the entity under cursor is represented by a delegate (e.g., icon)
void SCR_HoverEditableEntityFilter.SetEntityUnderCursor | ( | SCR_EditableEntityComponent | entity, |
bool | isDelegate = false |
||
) |
Set which entity is under cursor.
entity | Editable entity |
isDelegate | True if the entity under cursor is represented by a delegate (e.g., icon), not a geometry. Delegates have higher priority, for example for camera snapping. |
void SCR_HoverEditableEntityFilter.SetEntityUnderCursorEnabled | ( | bool | enabled | ) |
Set if the entity under cursor can be assigned.
Important for systems that could collide with entity under cursor (e.g., selection frame).
enable | True to enable asisgning (default: true) |
|
protected |