Eden Editor: Entity Context Menu: Difference between revisions
Jump to navigation
Jump to search
(wording) |
m (Removed: Description of simple expressions. That one belongs to the Simple Expressions page, not here.) |
||
Line 1: | Line 1: | ||
WIP | WIP | ||
== Conditions == | == Conditions == | ||
Line 11: | Line 8: | ||
<code>class YourEntry | <code>class YourEntry | ||
{ | { | ||
action = "call BIS_fnc_someFunction";//Can be any kind of expression defined as string | action = "call BIS_fnc_someFunction"; // Can be any kind of expression defined as string | ||
text = "Delete Crew"; // Name shown in the context menu | |||
conditionShow = "hoverObjectVehicle";//Condition | conditionShow = "hoverObjectVehicle"; // Condition | ||
};</code> | };</code> | ||
The condition can | The condition is a [[Simple Expression]] and can use one of the variables below: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! Condition | ! Condition | ||
Line 48: | Line 27: | ||
| <!-- Condition --> hoverObjectVehicle | | <!-- Condition --> hoverObjectVehicle | ||
| <!-- Description -->True when hovering over a vehicle | | <!-- Description -->True when hovering over a vehicle | ||
|- | |- | ||
| <!-- Condition --> hoverObject | | <!-- Condition --> hoverObject | ||
Line 69: | Line 45: | ||
| <!-- Condition --> hoverMarker | | <!-- Condition --> hoverMarker | ||
| <!-- Description -->True when hovering over any marker | | <!-- Description -->True when hovering over any marker | ||
|- | |- | ||
| <!-- Condition --> isMultiplayer | | <!-- Condition --> isMultiplayer | ||
Line 80: | Line 53: | ||
|- | |- | ||
| <!-- Condition --> isEditList | | <!-- Condition --> isEditList | ||
| <!-- Description --> | | <!-- Description -->True when the menu is opened from entity menu | ||
|- | |- | ||
| <!-- Condition --> hoverLayer | | <!-- Condition --> hoverLayer | ||
Line 103: | Line 76: | ||
| <!-- Description -->True when a Marker is selected | | <!-- Description -->True when a Marker is selected | ||
|} | |} | ||
[[Category:Eden Editor|Entity Context Menu]] | |||
[[Category:Eden Editor: Modding|Entity Context Menu]] |
Revision as of 10:38, 5 December 2016
WIP
Conditions
- Context menu entries can have different conditions which need to be true in order for the entry to appear.
- The condition is defined by the conditionShow config entry.
class YourEntry
{
action = "call BIS_fnc_someFunction"; // Can be any kind of expression defined as string
text = "Delete Crew"; // Name shown in the context menu
conditionShow = "hoverObjectVehicle"; // Condition
};
The condition is a Simple Expression and can use one of the variables below:
Condition | Description |
---|---|
selected | True when an Eden entity is selected |
hoverObjectBrain | True when hovering over an object with simulation "soldier" or "UAVpilot" |
hoverObjectVehicle | True when hovering over a vehicle |
hoverObject | True when hovering over any object |
hoverGroup | True when hovering over any group |
hoverTrigger | True when hovering over any trigger |
hoverWaypoint | True when hovering over any waypoint |
hoverLogic | True when hovering over any logic |
hoverMarker | True when hovering over any marker |
isMultiplayer | True when editing in multiplayer environment |
hoverObjectUav | True when hovering over an UAV |
isEditList | True when the menu is opened from entity menu |
hoverLayer | True when hovering over a Layer |
hoverObjectCanFly | True when hovering an object which can fly |
hoverObjectCanFly | True when hovering an object which is flying |
selectedObject | True when an object is selected |
selectedWaypoint | True when a waypoint is selected |
selectedLogic | True when a logic is selected |
selectedMarker | True when a Marker is selected |