ModalDialog Class
Manages a modal dialog which can be presented to the user.
Syntax
[Sansar.Script.Interface]
public class ModalDialog : Sansar.Script.InstanceInterface
public class ModalDialog : Sansar.Script.InstanceInterface
Remarks
Set the message and the button text.
Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Members
See Also: Inherited members from Sansar.Script.InstanceInterface.
Public Properties
[read-only]
|
IsValid | bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.) |
[read-only]
|
Message | string . The message displayed on the dialog. |
[read-only]
|
Response | string . The response from the last ModalDialog.Show(string, string, string, Sansar.Script.ScriptBase.OperationComplete) call. |
Public Methods
|
Cancel ()
Cancels any existing dialog. |
|
|
Show (string, string, string)
Shows a Modal Dialog on the screen. |
|
|
Show (string, string, string, Sansar.Script.ScriptBase.OperationComplete) : ulong
Shows a Modal Dialog on the screen. |
|
|
Show (string, string, string, Action<Sansar.Script.OperationCompleteEvent>)
Shows a Modal Dialog on the screen. |
|
override
|
ToString () : string
A string representation of this object. |
Member Details
Cancel Method
Cancels any existing dialog.Syntax
[Sansar.Script.Interface]
public void Cancel ()Remarks
Does not generate an event.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 Message { get; }Value
The string displayed on the dialog.Remarks
This is set by the ModalDialog.Show(string, string, string, Sansar.Script.ScriptBase.OperationComplete) method upon creation.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
Response Property
The response from the last ModalDialog.Show(string, string, string, Sansar.Script.ScriptBase.OperationComplete) call.Syntax
[get: Sansar.Script.Interface]
public string Response { get; }Value
String response from the last show call.Remarks
This value will be valid after the event occurs.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.
Returns
The internal event id for the completion event.Remarks
Call this with Sansar.Script.ScriptBase.WaitFor``3(Action<``0, ``1, ``2, Action<Sansar.Script.OperationCompleteEvent>>,``0,``1,``2) in a coroutine to block until the event is generated.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]
[System.Obsolete("Deprecated. Use the Action<> overload", false)]
public ulong Show (string message, string leftButton, string rightButton, Sansar.Script.ScriptBase.OperationComplete handler)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
Call this with Sansar.Script.ScriptBase.WaitFor``3(Action<``0, ``1, ``2, Action<Sansar.Script.OperationCompleteEvent>>,``0,``1,``2) in a coroutine to block until the event is generated.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 Show (string message, string leftButton, string rightButton, Action<Sansar.Script.OperationCompleteEvent> handler)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
Call this with Sansar.Script.ScriptBase.WaitFor``3(Action<``0, ``1, ``2, Action<Sansar.Script.OperationCompleteEvent>>,``0,``1,``2) in a coroutine to block until the event is generated.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 ToString ()Returns
A string representation of this object.Remarks
The format of this string may change between releases.Requirements
Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0
0 Comments