InteractionActionMenu
- Last UpdatedDec 16, 2023
- 4 minute read
This topic is part of Specialized 2D Nodes.
InteractionActionMenu node
The InteractionActionMenu is a 2D interface that presents the player with all the actions that can be performed on an item or group of items.
-
For each action, there is a test action and an optional hotkey. This works together with an instance of InteractionSelector and uses the item action fields.
-
The user can trigger an action by moving the selector and pressing the action button, or by directly pressing the hotkey button, if any.
-
The viewer visible attribute displays whether the InteractionSelector is selecting an item. You can also use the viewer visible attribute to hide selection.
-
Each item has a predefined set of actions that can be extended by a set of user actions.

Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Action sorting order
Actions are sorted in this order:
-
Ascending actionOrder parameter.
-
Ascending text field, when the actionOrder is the same.
-
Ascending action name, when the text is the same.
-
-
When the actionOrder is set to -1 (default), a numeric hotkey value is used instead of actionOrder.
Hotkey sorting order
Hotkeys are sorted this way.
none(0),L(1),R(2),U(3),D(4),X(5),A(6),B(7),Y(8),LB(9),LT(10),RB(11),RT(12),BACK(13),START(14),L3(15),R3(16)
Code example
This is a code example for the InteractionActionMenu node.
<InteractionActionMenu="interactionActionMenu" position="1398 724" size="256 128" selectorNode="sel" order="20" />
InteractionActionMenu fields
These are the fields for InteractionActionMenu node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > InteractionActionMenu
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
backgroundImage |
sstring |
Optional |
interactionmenu_background.png |
Defines component background image. If not set the background is transparent. |
|
enabled |
sbool |
Optional |
true |
Enables/disables selection interaction. Action can be triggered only by hotkeys |
|
hotkeyArea |
svec4 |
Optional |
40 -40 48 48 |
Defines hotkey image rectangle client area. Position is relative to selected action. |
|
hotkeyVisible |
sbool |
Optional |
true |
If set to false, hotkeys are not shown and component area is limited to text area. |
|
line1font |
sstring |
Optional |
Arial,Bold|outline|shadow,15 |
The font to use for action text. The font name must be a system font. |
|
mouseDown |
sevent |
Optional |
Internally calculated |
Generated when clicking in its area. |
|
mousePosition |
svec2 |
Read only |
Internally calculated |
The mouse position in screen grid coordinates. |
|
mouseUp |
sevent |
Optional |
Internally calculated |
Generated when releasing after clicking in its area. |
|
next |
sstring |
Optional |
Not set |
Event called from external to move selector right. |
|
order |
sint |
Optional |
100 |
The node z order that defines the display order of different children. The range is 0-255. |
|
position |
svec2 |
Optional |
0 0 |
Position of the 2D interface referred to the screen top left corner. |
|
prev |
sstring |
Optional |
Not set |
Event called from external to move selector left. |
|
textArea |
svec4 |
Optional |
0 0 128 32 |
Defines the action text rectangle client area |
|
textColor |
svec3 |
Optional |
1 1 1 |
Text color. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
saveSelectedAction |
sbool |
Optional |
true |
If set to true, the node records the last selected action for each Item in order to restore it when the item is re-selected |
|
selectDown |
sstring |
Optional |
Not set |
Event called from external to push an action. |
|
selectUp |
sstring |
Optional |
Not set |
Event called from external to release an action. |
|
selectorImage |
sstring |
Optional |
interactionmenu_selector.png |
The selector image. By default, this is a triangle. |
|
selectorImageArea |
svec4 |
Optional |
56 32 16 16 |
Defines the selector image rectangle client area. Position is relative to selected action. |
|
selectorNode |
sstring |
Mandatory |
Not set |
The name of the InteractionSelector to work with. |
|
visible |
sbool |
Read only |
Internally calculated |
Set to false to hide InteractionActionMenu independently from InteractionSelector. When hidden, no action can be performed. |