Defining a Right Click Action on Equipment
- Last UpdatedJul 13, 2023
- 1 minute read
In a Situational Awareness Project, you can define a right-click action/command for a piece of equipment using a callback. This is achieved by specifying a custom function for the label "_CALLBACK_EquipmentRightClick".
In a project created from the Situational Awareness Starter Project, the default function specified for the label is "DefaultEquipmentRightClickCallback". To change this:
-
Go to the Standards activity and select Labels.
-
Locate the "_CALLBACK_EquipmentRightClick" label.

-
In the Expression field, enter a custom function.
The function you create needs to take the following two arguments:
-
sEquip - the current primary equipment context
-
sEquipSecondary - the current secondary equipment context.
-
-
Save your changes.
If you do not define a label specifying a custom function (or the default function), a callback error message will be generated when you compile your project.