How to add a Panel which can be opened from an Action Menu: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Panel]]s can easily be given a location in the [[3D world]], making them accessible via a [[Popup]] in the [[3D world]]. However, [[Panel]]s 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 [[Global]]s. Although not as trivial as setting a geographical location, it is possible to make a [[Panel]] accessible via an [[Action Menu]].
[[Panel]]s can easily be given a location in the [[3D world]], making them accessible via a [[Popup]] in the [[3D world]]. However, [[Panel]]s 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 [[Global]]s. 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]].
This can be done for any [[Panel]], and doing so consists of three steps. First, create the [[Panel]] which should be opened. Next, add an [[Event Bundle]] which triggers the appearance of the [[Panel]]. Finally, add the [[Event Bundle]] to an [[Action Menu]].


==Creating a Panel==
==Creating a Panel==
Line 38: Line 38:


==Notes==
==Notes==
* If a [[Stakeholder]] is not permitted to view the [[Panel]] (because it is not the Panel's assigned [[Stakeholder]], opening the [[Panel]] via this route will instead display a notice to the user that they are not permitted to view the [[Panel]].
* If the [[Panel]] has a location in the [[3D world]], and thus a [[Popup]] which can be clicked on to open the [[Panel]], that does not preclude opening the [[Panel]] via an [[Action Menu]].
* 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.  
* 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]].
* Since only a [[Client Event]] is triggered, using this [[Action Menu]] in the [[Editor]] does not trigger the start of a [[testrun]].

Revision as of 14:37, 1 July 2020

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 three steps. First, create the Panel which should be opened. Next, add an Event Bundle which triggers the appearance of the Panel. Finally, add the Event Bundle 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

Editor → Future Design (Ribbon tab) → Event Bundles (Ribbon bar)
How to create an Event Bundle to open a Panel:
  1. Open the list of Event Bundles.
  2. At the bottom of the left panel, select "Add".
  3. The Event Bundle is now added. Make sure it is selected.
  4. At the bottom of the right panel, select "Add Client Event".
  5. In the right panel, set the name of the Event Bundle to something like "Open panel".
  6. Select the now added "NO_DEF" Event.
  7. In the bottom panel, select the SHOW_CUSTOM_PANEL Event.
  8. In the bottom panel, for the "Panel ID", select the Panel which should open.
  9. In the bottom panel, ensure the "Visible" box is checked.
  10. In the bottom panel, click on "Commit".
  11. The Event Bundle is now ready to open the specific panel configured.

Adding the Event Bundle to an Action Menu

Editor → Future Design (Ribbon tab) → Actions (Ribbon bar)
How to create an Action Menu to trigger an Event Bundle:
  1. Open the list of Action Menus.
  2. At the bottom of the left panel, select "Add".
  3. The Action Menu is now added. Make sure it is selected
  4. In the right panel, on the "general" tab, set the name of the Action Menu to something like "Show information".
  5. In the right panel, on the "general" tab, ensure all the Stakeholders which should be able to open the Panel this way are checked.
  6. 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.)
  7. The Action Menu is now ready. Clicking on it will open the desired Panel.

Notes