> For the complete documentation index, see [llms.txt](https://docs.creams-productions.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.creams-productions.nl/projects/creams-console-utilities-package-documentation/release-1-never-finsished/selection-menu.md).

# Selection menu

```csharp
// all selection menu settings
public ConsoleColor unselectedColor = ConsoleColor.White;//when not hovered is this color
public ConsoleColor hoverColor = ConsoleColor.Blue;// when hover over color
public string title = string.Empty; // set selection menutitle
public string description = string.Empty;// sets selection menu discription
public bool HasExit = true; //set if there is a way to exit without a selected option
```

***

```csharp
Config.AddChoise(title,returnid(optional))// adds option title and returnID

// the return id is set to title if not used
// The return id is usefull for getting selected option data out of returnDatatype
```

***

### Example code

```csharp
using CreamsConsole_utils;

selectionMenu.config config = new selectionMenu.config() { };

config.AddChoise("Option 1", "returnID 1"); // add option with title and a return id 
config.AddChoise("Option 2", "returnID 2");
config.AddChoise("Option 3"); // add option with title and a return id = title
config.title = "Im a title";
config.description = "im a discription";


string output = selectionMenu.runtimeMenu(config);
Console.WriteLine(output);
```

#### Output

<figure><img src="https://3418145299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEZJpikjAR8f5jOqrUkvh%2Fuploads%2FCHTCHbb13VZS5dkUnOMU%2FselectionMenu.png?alt=media&amp;token=096d612f-a95a-4a76-a44e-abc6cf603803" alt=""><figcaption><p>with exit</p></figcaption></figure>

<figure><img src="https://3418145299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEZJpikjAR8f5jOqrUkvh%2Fuploads%2Fdfm0B7Q1BGlQqXF0IhF9%2FselectionMenu1.png?alt=media&amp;token=5e183d38-b9be-4bb7-9962-806165b12508" alt=""><figcaption><p>without exit</p></figcaption></figure>
