# Configure TitlePanel, DecisionPanel

This page provides configuration details for other GameObjects used with Dialog Prefabs.

For any UI-Panel that you'd like to show/hide, you must add a CanvasGroup, and the Hide\_Show\_Panel script as shown in the image below.

The Hide\_Show\_Panel.cs script component's public fields: **ShowOnStart, CloseButton, OpenButton** will be configured according to desired behavior for each situation. The examples below show a few possible configurations.

## Hide\_Show\_Panel, CanvasGroup

![](https://1604956922-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0-KLgOacVpbicrqehO%2F-M0-KOTdBSCNJjpmpwrG%2F-M0-KjHcQgulBqUGkCp1%2FScreen%20Shot%202019-03-06%20at%203.25.54%20PM.png?generation=1581627422968009\&alt=media) Example Configuration for TitlePanel shown above

## TitlePanel - Prefab (Optional)

The image below shows the hierarchy panel for a TitlePanel that has a UI text, and a UI-Button that can be used to open a dialog prefab.

![](https://1604956922-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0-KLgOacVpbicrqehO%2F-M0-KOTdBSCNJjpmpwrG%2F-M0-KjHeDEsC0MDX_Sgh%2FScreen%20Shot%202019-03-06%20at%202.26.55%20PM.png?generation=1581627422644172\&alt=media)

**TitlePanel:** This is a UI-Panel with children:

* **Children:**
* UI-Text: TitleText
* UI\_Button: StartDialogBtn
* **Attach CanavasGroup**&#x20;
* **Attach Hide\_Show\_Panel.cs** The Hide\_Show\_Panel script will make sure the panel shows at start, and is hidden when the StartDialogBtn is clicked.
* Configuration for **Hide\_Show\_Panel.cs on TitlePanel:**&#x20;
* ShowOnStart checked as True
* CloseButton: StartDialogBtn
* OpenButton: empty

## DecisionPanel - Prefab

This prefab is a UI panel that contains 2 buttons that can be used for scene change logic in all scenes. It should start as hidden, then it's opened by the DialogPanel's script, when there's no dialog left to display. It is configured as the "NextPanelToOpen" for the SimpleDialog and DialogManager scripts.

![](https://1604956922-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0-KLgOacVpbicrqehO%2F-M0-KOTdBSCNJjpmpwrG%2F-M0-KjHg8YAUeuI8I_rs%2FScreen%20Shot%202019-03-06%20at%202.27.05%20PM.png?generation=1581627422880799\&alt=media)

**DecisionPanel:**&#x54;his is a UI-Panel with 2 child-objects that are UI-Buttons.

**RectTransform anchors** for the buttons should be set to: ButtonOption1: Left Edge of parent (vertically aligned to center) ButtonOption2: Right Edges of parent (vertically aligned to center)

**Attach CanvasGroup and Hide\_Show\_Panel.cs**

* Configuration for **Hide\_Show\_Panel.cs on DecisionPanel:**&#x20;
* ShowOnStart not checked - default is false
* CloseButton: empty
* OpenButton: empty

**Once Configured: Create prefabs** for reuse in other scenes.
