Eden Editor: Entity Context Menu: Difference between revisions
No edit summary |
(Further formatting) |
||
Line 6: | Line 6: | ||
== Conditions == | == Conditions == | ||
*Context menu | *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 | *The condition is defined by the '''conditionShow''' config entry. | ||
<code>class YourEntry | <code>class YourEntry | ||
Line 18: | Line 18: | ||
The condition can be one of the strings from the table below, or a combination of multiple conditions.<br><br> | The condition can be one of the strings from the table below, or a combination of multiple conditions.<br><br> | ||
'''Example 1''': <code>conditionShow = " | '''Example 1''': <code>conditionShow = "hoverObjectCanFly";</code> | ||
Entry will only show if the | Entry will only show if the object you are hovering over can fly.<br><br> | ||
'''Example 2:''' <code>conditionShow = "hoverObjectCanFly * (1 - hoverObjectFlying)";</code> | '''Example 2:''' <code>conditionShow = "hoverObjectCanFly * (1 - hoverObjectFlying)";</code> | ||
Entry will only show if the object can fly and the object isn't flying.<br><br> | Entry will only show if the object you are hovering over can fly and the object isn't flying.<br><br> | ||
=== How does it work? === | |||
hoverObjectCanFly | '''hoverObjectFlying''' and '''hoverObjectCanFly''' are nothing less than two boolean values, which can either be [[true]] (0) or [[false]] (1).<br><br> | ||
''' | If '''hoverObjectFlying''' is [[false]] (0) and '''hoverObjectCanFly''' is [[true]] (1) the resulting formular looks like this:<br> | ||
<code>1 * (1-0) = 1</code> | |||
The result will be [[true]] (1), therefore the entry will be shown. | |||
=== Supported Conditions === | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! Condition | ! Condition | ||
! class="unsortable" | Description | ! class="unsortable" | Description | ||
|- | |- | ||
| <!-- Condition --> objectBrain | | <!-- Condition --> selected | ||
| <!-- | | <!-- Description -->True when an Eden entity is selected | ||
| <!-- Description --> | |- | ||
| <!-- Condition --> hoverObjectBrain | |||
| <!-- Description -->True when hovering over an objectBrain, e.g, AI | |||
|- | |||
| <!-- Condition --> hoverObjectVehicle | |||
| <!-- Description -->True when hovering over a vehicle | |||
|- | |||
| <!-- Condition --> IsInternal | |||
| <!-- Description -->Unknown | |||
|- | |||
| <!-- Condition --> hoverObject | |||
| <!-- Description -->True when hovering over any object | |||
|- | |||
| <!-- Condition --> hoverGroup | |||
| <!-- Description -->True when hovering over any group | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverTrigger | ||
| <!-- Description -->True when hovering over any trigger | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverWaypoint | ||
| <!-- Description -->True when hovering over any waypoint | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverLogic | ||
| <!-- Description -->True when hovering over any logic | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverMarker | ||
| <!-- Description -->True when hovering over any marker | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverObjectAttached | ||
| <!-- Description -->Unknown | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> isMultiplayer | ||
| <!-- Description -->True when editing in multiplayer environment | |||
| <!-- Description --> | |||
|- | |- | ||
| <!-- Condition --> | | <!-- Condition --> hoverObjectUav | ||
| <!-- | | <!-- Description -->True when hovering over an UAV | ||
| <!-- Description --> | |- | ||
| <!-- Condition --> isEditList | |||
| <!-- Description -->Unknown | |||
|- | |||
| <!-- Condition --> hoverLayer | |||
| <!-- Description -->True when hovering over a Layer | |||
|- | |||
| <!-- Condition --> hoverObjectCanFly | |||
| <!-- Description -->True when hovering an object which can fly | |||
|- | |||
| <!-- Condition --> hoverObjectCanFly | |||
| <!-- Description -->True when hovering an object which is flying | |||
|- | |||
| <!-- Condition --> selectedObject | |||
| <!-- Description -->True when an object is selected | |||
|- | |||
| <!-- Condition --> selectedWaypoint | |||
| <!-- Description -->True when a waypoint is selected | |||
|- | |||
| <!-- Condition --> selectedLogic | |||
| <!-- Description -->True when a logic is selected | |||
|- | |||
| <!-- Condition --> selectedMarker | |||
| <!-- Description -->True when a Marker is selected | |||
|} | |} | ||
Revision as of 17:15, 3 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 can be one of the strings from the table below, or a combination of multiple conditions.
Example 1: conditionShow = "hoverObjectCanFly";
Entry will only show if the object you are hovering over can fly.
Example 2: conditionShow = "hoverObjectCanFly * (1 - hoverObjectFlying)";
Entry will only show if the object you are hovering over can fly and the object isn't flying.
How does it work?
hoverObjectFlying and hoverObjectCanFly are nothing less than two boolean values, which can either be true (0) or false (1).
If hoverObjectFlying is false (0) and hoverObjectCanFly is true (1) the resulting formular looks like this:
1 * (1-0) = 1
The result will be true (1), therefore the entry will be shown.
Supported Conditions
Condition | Description |
---|---|
selected | True when an Eden entity is selected |
hoverObjectBrain | True when hovering over an objectBrain, e.g, AI |
hoverObjectVehicle | True when hovering over a vehicle |
IsInternal | Unknown |
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 |
hoverObjectAttached | Unknown |
isMultiplayer | True when editing in multiplayer environment |
hoverObjectUav | True when hovering over an UAV |
isEditList | Unknown |
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 |