# Modal Dialogue

### ModalDialog Class

Manages a modal dialog which can be presented to the user.

### Syntax

### Member Details

#### Cancel Method

> Cancels any existing dialog.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Cancel** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Message Property

> The message displayed on the dialog.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Message** { get; }
>
> **Value**
>
> > The string displayed on the dialog.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Response Property

> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Response** { get; }
>
> **Value**
>
> > String response from the last show call.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Show Method

> Shows a Modal Dialog on the screen.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Show** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message, [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) leftButton, [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) rightButton)
>
> **Parameters**
>
> > *message*
> >
> > Text of the dialog.
> >
> > *leftButton*
> >
> > Text of the left button.
> >
> > *rightButton*
> >
> > Text of the right button.
>
> **Returns**
>
> > The internal event id for the completion event.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Show Method

> Shows a Modal Dialog on the screen.
>
> #### Syntax
>
> **Parameters**
>
> > *message*
> >
> > Text of the dialog.
> >
> > *leftButton*
> >
> > Text of the left button.
> >
> > *rightButton*
> >
> > Text of the right button.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The internal event id for the completion event.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Show Method

> Shows a Modal Dialog on the screen.
>
> #### Syntax
>
> **Parameters**
>
> > *message*
> >
> > Text of the dialog.
> >
> > *leftButton*
> >
> > Text of the left button.
> >
> > *rightButton*
> >
> > Text of the right button.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The internal event id for the completion event.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***


---

# Agent Instructions: 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:

```
GET https://docs.sansar.com/latest/script-api-docs/sansar-simulation-namespace/modal-dialogue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
