> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs2335/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs2335/cs2335_f20/project-2-dialog/configure-titlepanel-decisionpanel.md).

# 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

![](/files/-M0-KjHcQgulBqUGkCp1) 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.

![](/files/-M0-KjHeDEsC0MDX_Sgh)

**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.

![](/files/-M0-KjHg8YAUeuI8I_rs)

**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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kdoore.gitbook.io/cs2335/cs2335_f20/project-2-dialog/configure-titlepanel-decisionpanel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
