Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SelectionBrushTool Interface Reference
Inheritance diagram for SCR_SelectionBrushTool:

Public Attributes

SCR_ESelectionBrushToolLayer m_eLayerSelection
 

Protected Member Functions

override void OnMousePressEvent (float x, float y, WETMouseButtonFlag buttons)
 Event triggering on Mouse click - see WorldEditorTool.OnMousePressEvent() Filtered to work only for left-click here Creates/Refreshes the Obstacles Detector and deals with Click / Alt+Click.
 
override void OnMouseMoveEvent (float x, float y)
 Event triggering on Mouse movement - see WorldEditorTool.OnMouseMoveEvent() Create/Delete entities and draw Alt+Click additional shapes.
 
override void OnWheelEvent (int delta)
 Event triggering on Mouse scroll wheel - see WorldEditorTool.OnWheelEvent() Used to set Brush's radius (Ctrl)
 
override void OnMouseReleaseEvent (float x, float y, WETMouseButtonFlag buttons)
 Event triggering on Mouse click release - see WorldEditorTool.OnMouseReleaseEvent() Filtered to work only for left-click here Clears "held mouse click" flag.
 
override void OnKeyPressEvent (KeyCode key, bool isAutoRepeat)
 Event triggering on keyboard (normal) key press - see WorldEditorTool.OnKeyPressEvent() Used to switch to Delete mode (Space) or cancel Alt+Click (Esc)
 
override void OnKeyReleaseEvent (KeyCode key, bool isAutoRepeat)
 Event triggering on keyboard (normal) key release - see WorldEditorTool.OnKeyReleaseEvent() Used to switch from Deselect mode (Space)
 
override void OnActivate ()
 
override void OnDeActivate ()
 
override void OnAfterLoadWorld ()
 
void SelectAroundCursor (vector cursorWorldPos)
 
bool CanSelectEntityFromItsLayer (int currentLayerId, notnull IEntitySource entitySource)
 
bool HasMeshObject (notnull IEntitySource entitySource)
 
IEntitySource GetTopMostParentWithMeshObject (notnull IEntitySource entitySource)
 return provided entitySource if no parent, whether or not it has a MeshObject component or not
 
void DeselectAroundCursor (vector cursorWorldPos)
 
array< IEntity > GetAllEntitiesAroundCursor (vector cursorWorldPos)
 
float AdjustValueUsingScrollWheel (float delta, float currentValue, float min, float max, float step)
 Helps getting proper new value for a property.
 
void DeleteSelectedEntities ()
 
void CreateBrush (vector worldPos)
 
void SetBrushColor (int colour)
 
bool IsWorldValid ()
 
void SCR_SelectionBrushTool ()
 

Protected Attributes

float m_fRadius
 
bool m_bDetectBySphere
 
bool m_bSnapToObjects
 
bool m_bUseTraceDetection
 
bool m_bSelectParentOnly
 
int m_iMaxSelectedEntities
 
ref SCR_SelectionBrushConfig m_ObjectsFilter
 
ref TraceSphere m_TraceSphere
 
bool m_bIsWorldValid
 
bool m_bIsMouseHeldDown
 
bool m_bIsInRemovalMode
 
bool m_bSmiley
 
bool m_bLimitReachedWarning
 
ref array< ref Shape > m_aBrushShapes
 first shape is the 2D circle second and third shape are horizontal/vertical lines fourth shape is either the sphere or the cylinder following shapes are altitude marks
 
vector m_vBrushShapePos
 used to re-create the brush on scrollwheel
 

Static Protected Attributes

static const int BRUSH_SHAPE_INDEX = 3
 
static const int BRUSH_COLOUR_ON_HOLD = ARGB(64, 128, 128, 128)
 moving without click
 
static const int BRUSH_COLOUR_NORMAL = ARGB(128, 128, 128, 0)
 clicked, no detection
 
static const int BRUSH_COLOUR_NORMAL_2D = ARGB(255, 0, 255, 0)
 2D circle
 
static const int BRUSH_COLOUR_GUIDE_2D = ARGB(64, 0, 255, 0)
 cylinder guide colour
 
static const int BRUSH_COLOUR_CAN_ADD = ARGB(128, 128, 64, 0)
 "entities are around"
 
static const int BRUSH_COLOUR_ADDED = ARGB(192, 128, 0, 0)
 "added an entity"
 
static const int BRUSH_COLOUR_REMOVAL = ARGB(128, 64, 64, 255)
 "removal mode"
 
static const int BRUSH_COLOUR_REMOVED = ARGB(192, 0, 0, 128)
 "removed an entity"
 
static const int BRUSH_COLOUR_ALTITUDE = ARGB(255, 255, 0, 0)
 ALT altitude indicator.
 
static const int BRUSH_GUIDE_2D_HEIGHT = 1000
 
static const float BRUSH_ALTITUDE_TOLERANCE = 0.5
 won't show ATL indicator if ATL Y is below this tolerance
 
static const float RADIUS_MIN = 1
 
static const float RADIUS_MAX = 100
 
static const float RADIUS_STEP = 1
 
static const int BRUSH_2D_Y_SEARCH = 10000
 
static const string MESHOBJECT_CLASSNAME = "MeshObject"
 

Constructor & Destructor Documentation

◆ SCR_SelectionBrushTool()

void SCR_SelectionBrushTool.SCR_SelectionBrushTool ( )
protected

Member Function Documentation

◆ AdjustValueUsingScrollWheel()

float SCR_SelectionBrushTool.AdjustValueUsingScrollWheel ( float delta,
float currentValue,
float min,
float max,
float step )
protected

Helps getting proper new value for a property.

Parameters
[in]deltathe scrollwheel value (obtained in OnWheelEvent) that is a multiple of 120
[in]currentValuethe value from which to start
[in]minthe min value
[in]maxthe max value
[in]stepthe step by which delta's converted value will be multiplied
Returns
the min-max clamped new value

◆ CanSelectEntityFromItsLayer()

bool SCR_SelectionBrushTool.CanSelectEntityFromItsLayer ( int currentLayerId,
notnull IEntitySource entitySource )
protected

◆ CreateBrush()

void SCR_SelectionBrushTool.CreateBrush ( vector worldPos)
protected

◆ DeleteSelectedEntities()

void SCR_SelectionBrushTool.DeleteSelectedEntities ( )
protected

◆ DeselectAroundCursor()

void SCR_SelectionBrushTool.DeselectAroundCursor ( vector cursorWorldPos)
protected

◆ GetAllEntitiesAroundCursor()

array< IEntity > SCR_SelectionBrushTool.GetAllEntitiesAroundCursor ( vector cursorWorldPos)
protected

◆ GetTopMostParentWithMeshObject()

IEntitySource SCR_SelectionBrushTool.GetTopMostParentWithMeshObject ( notnull IEntitySource entitySource)
protected

return provided entitySource if no parent, whether or not it has a MeshObject component or not

◆ HasMeshObject()

bool SCR_SelectionBrushTool.HasMeshObject ( notnull IEntitySource entitySource)
protected

◆ IsWorldValid()

bool SCR_SelectionBrushTool.IsWorldValid ( )
protected

◆ OnActivate()

override void SCR_SelectionBrushTool.OnActivate ( )
protected

◆ OnAfterLoadWorld()

override void SCR_SelectionBrushTool.OnAfterLoadWorld ( )
protected

◆ OnDeActivate()

override void SCR_SelectionBrushTool.OnDeActivate ( )
protected

◆ OnKeyPressEvent()

override void SCR_SelectionBrushTool.OnKeyPressEvent ( KeyCode key,
bool isAutoRepeat )
protected

Event triggering on keyboard (normal) key press - see WorldEditorTool.OnKeyPressEvent() Used to switch to Delete mode (Space) or cancel Alt+Click (Esc)

Parameters
[in]key
[in]isAutoRepeat

◆ OnKeyReleaseEvent()

override void SCR_SelectionBrushTool.OnKeyReleaseEvent ( KeyCode key,
bool isAutoRepeat )
protected

Event triggering on keyboard (normal) key release - see WorldEditorTool.OnKeyReleaseEvent() Used to switch from Deselect mode (Space)

Parameters
[in]key
[in]isAutoRepeat

◆ OnMouseMoveEvent()

override void SCR_SelectionBrushTool.OnMouseMoveEvent ( float x,
float y )
protected

Event triggering on Mouse movement - see WorldEditorTool.OnMouseMoveEvent() Create/Delete entities and draw Alt+Click additional shapes.

Parameters
[in]x
[in]y
[in]buttons

◆ OnMousePressEvent()

override void SCR_SelectionBrushTool.OnMousePressEvent ( float x,
float y,
WETMouseButtonFlag buttons )
protected

Event triggering on Mouse click - see WorldEditorTool.OnMousePressEvent() Filtered to work only for left-click here Creates/Refreshes the Obstacles Detector and deals with Click / Alt+Click.

Parameters
[in]x
[in]y
[in]buttons

◆ OnMouseReleaseEvent()

override void SCR_SelectionBrushTool.OnMouseReleaseEvent ( float x,
float y,
WETMouseButtonFlag buttons )
protected

Event triggering on Mouse click release - see WorldEditorTool.OnMouseReleaseEvent() Filtered to work only for left-click here Clears "held mouse click" flag.

Parameters
[in]x
[in]y
[in]buttons

◆ OnWheelEvent()

override void SCR_SelectionBrushTool.OnWheelEvent ( int delta)
protected

Event triggering on Mouse scroll wheel - see WorldEditorTool.OnWheelEvent() Used to set Brush's radius (Ctrl)

Parameters
[in]deltathe scroll wheel difference value

◆ SelectAroundCursor()

void SCR_SelectionBrushTool.SelectAroundCursor ( vector cursorWorldPos)
protected

◆ SetBrushColor()

void SCR_SelectionBrushTool.SetBrushColor ( int colour)
protected

Member Data Documentation

◆ BRUSH_2D_Y_SEARCH

const int SCR_SelectionBrushTool.BRUSH_2D_Y_SEARCH = 10000
staticprotected

◆ BRUSH_ALTITUDE_TOLERANCE

const float SCR_SelectionBrushTool.BRUSH_ALTITUDE_TOLERANCE = 0.5
staticprotected

won't show ATL indicator if ATL Y is below this tolerance

◆ BRUSH_COLOUR_ADDED

const int SCR_SelectionBrushTool.BRUSH_COLOUR_ADDED = ARGB(192, 128, 0, 0)
staticprotected

"added an entity"

◆ BRUSH_COLOUR_ALTITUDE

const int SCR_SelectionBrushTool.BRUSH_COLOUR_ALTITUDE = ARGB(255, 255, 0, 0)
staticprotected

ALT altitude indicator.

◆ BRUSH_COLOUR_CAN_ADD

const int SCR_SelectionBrushTool.BRUSH_COLOUR_CAN_ADD = ARGB(128, 128, 64, 0)
staticprotected

"entities are around"

◆ BRUSH_COLOUR_GUIDE_2D

const int SCR_SelectionBrushTool.BRUSH_COLOUR_GUIDE_2D = ARGB(64, 0, 255, 0)
staticprotected

cylinder guide colour

◆ BRUSH_COLOUR_NORMAL

const int SCR_SelectionBrushTool.BRUSH_COLOUR_NORMAL = ARGB(128, 128, 128, 0)
staticprotected

clicked, no detection

◆ BRUSH_COLOUR_NORMAL_2D

const int SCR_SelectionBrushTool.BRUSH_COLOUR_NORMAL_2D = ARGB(255, 0, 255, 0)
staticprotected

2D circle

◆ BRUSH_COLOUR_ON_HOLD

const int SCR_SelectionBrushTool.BRUSH_COLOUR_ON_HOLD = ARGB(64, 128, 128, 128)
staticprotected

moving without click

◆ BRUSH_COLOUR_REMOVAL

const int SCR_SelectionBrushTool.BRUSH_COLOUR_REMOVAL = ARGB(128, 64, 64, 255)
staticprotected

"removal mode"

◆ BRUSH_COLOUR_REMOVED

const int SCR_SelectionBrushTool.BRUSH_COLOUR_REMOVED = ARGB(192, 0, 0, 128)
staticprotected

"removed an entity"

◆ BRUSH_GUIDE_2D_HEIGHT

const int SCR_SelectionBrushTool.BRUSH_GUIDE_2D_HEIGHT = 1000
staticprotected

◆ BRUSH_SHAPE_INDEX

const int SCR_SelectionBrushTool.BRUSH_SHAPE_INDEX = 3
staticprotected

◆ m_aBrushShapes

ref array<ref Shape> SCR_SelectionBrushTool.m_aBrushShapes
protected

first shape is the 2D circle second and third shape are horizontal/vertical lines fourth shape is either the sphere or the cylinder following shapes are altitude marks

◆ m_bDetectBySphere

bool SCR_SelectionBrushTool.m_bDetectBySphere
protected

◆ m_bIsInRemovalMode

bool SCR_SelectionBrushTool.m_bIsInRemovalMode
protected

◆ m_bIsMouseHeldDown

bool SCR_SelectionBrushTool.m_bIsMouseHeldDown
protected

◆ m_bIsWorldValid

bool SCR_SelectionBrushTool.m_bIsWorldValid
protected

◆ m_bLimitReachedWarning

bool SCR_SelectionBrushTool.m_bLimitReachedWarning
protected

◆ m_bSelectParentOnly

bool SCR_SelectionBrushTool.m_bSelectParentOnly
protected

◆ m_bSmiley

bool SCR_SelectionBrushTool.m_bSmiley
protected

◆ m_bSnapToObjects

bool SCR_SelectionBrushTool.m_bSnapToObjects
protected

◆ m_bUseTraceDetection

bool SCR_SelectionBrushTool.m_bUseTraceDetection
protected

◆ m_eLayerSelection

SCR_ESelectionBrushToolLayer SCR_SelectionBrushTool.m_eLayerSelection

◆ m_fRadius

float SCR_SelectionBrushTool.m_fRadius
protected

◆ m_iMaxSelectedEntities

int SCR_SelectionBrushTool.m_iMaxSelectedEntities
protected

◆ m_ObjectsFilter

ref SCR_SelectionBrushConfig SCR_SelectionBrushTool.m_ObjectsFilter
protected

◆ m_TraceSphere

ref TraceSphere SCR_SelectionBrushTool.m_TraceSphere
protected

◆ m_vBrushShapePos

vector SCR_SelectionBrushTool.m_vBrushShapePos
protected

used to re-create the brush on scrollwheel

◆ MESHOBJECT_CLASSNAME

const string SCR_SelectionBrushTool.MESHOBJECT_CLASSNAME = "MeshObject"
staticprotected

◆ RADIUS_MAX

const float SCR_SelectionBrushTool.RADIUS_MAX = 100
staticprotected

◆ RADIUS_MIN

const float SCR_SelectionBrushTool.RADIUS_MIN = 1
staticprotected

◆ RADIUS_STEP

const float SCR_SelectionBrushTool.RADIUS_STEP = 1
staticprotected

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