How to add a Panel which can be opened from an Action Menu
Revision as of 14:27, 1 July 2020 by Rudolf@tygron.nl (talk | contribs)
Panels can easily be given a location in the 3D world, making them accessible via a Popup in the 3D world. However, Panels do not necessarily need to be related to anything spatial. For example, a Panel may display information about a specific Stakeholder, or information on policies encoded as values of Globals. Although not as trivial as setting a geographical location, it is possible to make a Panel accessible via an Action Menu.
This can be done for any Panel, and doing so consists of two steps. First, an Event Bundle must be defined which triggers the appearance of the Panel. Then, the Event Bundle must be added to an Action Menu.
Creating a Panel
- Main article: How to add a Panel
First ensure you have a Panel which you want to allow to be opened via an Action Menu.
Creating an Event Bundle
How to create an Event Bundle to open a Panel:
- Open the list of Event Bundles.
- At the bottom of the left panel, select "Add".
- The Event Bundle is now added. Make sure it is selected.
- At the bottom of the right panel, select "Add Client Event".
- In the right panel, set the name of the Event Bundle to something like "Open panel".
- Select the now added "NO_DEF" Event.
- In the bottom panel, select the SHOW_CUSTOM_PANEL Event.
- In the bottom panel, for the "Panel ID", select the Panel which should open.
- In the bottom panel, ensure the "Visible" box is checked.
- In the bottom panel, click on "Commit".
- The Event Bundle is now ready to open the specific panel configured.
Adding the Event Bundle to an Action Menu
How to create an Action Menu to trigger an Event Bundle:
- Open the list of Action Menus.
- At the bottom of the left panel, select "Add".
- The Action Menu is now added. Make sure it is selected
- In the right panel, on the "general" tab, set the name of the Action Menu to something like "Show information".
- In the right panel, on the "general" tab, ensure all the Stakeholders which should be able to open the Panel this way are checked.
- In the right panel, on the "actions" tab, open the "Event Bundles" listing, and select the "Open panel" Event Bundle. (The name should match the name set for the Event Bundle earlier.)
- The Action Menu is now ready. Clicking on it will open the desired Panel.
Notes
- If the Action Menu only has a single Event Bundle as its content, and the Action Menu is clicked, the Event Bundle is triggered directly. If more Action are added as content to the Action Menu, the menu opens as normal and the user must explicitly select and opt to use the Event Bundle as an Action. The effect of explicitly triggering the Event Bundle in that way is the same.
- Since only a Client Event is triggered, using this Action Menu in the Editor does not trigger the start of a testrun.