Murl Engine Lua Addon API  Version 1.0 beta
Murl.ISystemDialog

The system-dialog interface.

The ISystemDialog object can be created by the ISystemDialogControl object.


Table members

Methods


GetTitle()

Get the title string.

String GetTitle()

Returns
String The title string.

GetMessage()

Get the message string.

String GetMessage()

Returns
String The message string.

GetNumberOfButtons()

Get the number of buttons.

Integer GetNumberOfButtons()

Returns
Integer the number of buttons.

GetButtonLabel(index)

Get a button label string by index. A valid button index is [0 .. GetNumberOfButtons() - 1].

String GetButtonLabel(Integer index)

Parameters
indexThe zero-based index of the button.
Returns
String The button label string.

AddButton(label)

Add a button to the dialog. Button appearance is platform dependent but it is ensured that the negative button is always button 0 on dialogs with more than 1 button. On Android the maximum number of visible dialog buttons is limited to 3.

Boolean AddButton(String label)

Parameters
labelThe button label string.
Returns
Boolean true if successful.

Open()

Open (show) the dialog.

Boolean Open()

Returns
Boolean true if successful.

Close(clickedButtonIndex)

Close (hide) the dialog. A valid button index is [0 .. GetNumberOfButtons() - 1].

Boolean Close(Integer clickedButtonIndex)

Parameters
clickedButtonIndexThe zero-based index of the clicked button.
Returns
Boolean true if successful.

IsOpen()

Check if the dialog is open.

Boolean IsOpen()

Returns
Boolean true if the dialog is open.

WasClosed()

Check if the dialog was closed in the most recent tick.

Boolean WasClosed()

Returns
Boolean true if the dialog was closed in the most recent tick.

GetClickedButtonIndex()

Get the clicked button index. ButtonIndex 0 is the default (selected) button, button appearance is right to left or bottom up.

Integer GetClickedButtonIndex()

Returns
Integer The zero-based index of the clicked button, or -1 if no button was selected.