Class UI
Create and manipulate UI elements.
Inheritance
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public static class UI : object
Methods
ShowConfirmDialog(String, Closure, Closure)
Show a simple confirm dialog.
Declaration
public static UIPanel ShowConfirmDialog(string text, Closure callbackOK = null, Closure callbackCancel = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to show |
Closure | callbackOK | What is called when the user clicks "OK" |
Closure | callbackCancel | What is called when the user clicks "Cancel" |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |
ShowConfirmDialog(String, String, Closure, Closure)
Show a simple confirm dialog.
Declaration
public static UIPanel ShowConfirmDialog(string title, string text, Closure callbackOK = null, Closure callbackCancel = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | A title to show |
System.String | text | The text to show |
Closure | callbackOK | What is called when the user clicks "OK" |
Closure | callbackCancel | What is called when the user clicks "Cancel" |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |
ShowDialog(String, String, UIButton[])
Show a dialog with a variable amount of buttons.
Declaration
public static UIPanel ShowDialog(string title, string text, params UIButton[] buttons)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | A title to show |
System.String | text | The text to show |
UIButton[] | buttons | A variable list of UIButtons to show |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |
ShowInputDialog(String, String, Closure, Boolean)
Show a dialog prompting the user for input.
Declaration
public static UIPanel ShowInputDialog(string title, string text, Closure callback, bool multiLine = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | A title to show |
System.String | text | The text to show |
Closure | callback | What is called when the user has finished entering text |
System.Boolean | multiLine | Whether we should spawn a multi-line input box or not (default: false) |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |
ShowMessageDialog(String, Closure)
Show a basic message dialog.
Declaration
public static UIPanel ShowMessageDialog(string text, Closure callback = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to show |
Closure | callback | What is called when the user closes the message dialog |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |
ShowMessageDialog(String, String, Closure)
Show a basic message dialog.
Declaration
public static UIPanel ShowMessageDialog(string title, string text, Closure callback = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | A title to show |
System.String | text | The text to show |
Closure | callback | What is called when the user closes the message dialog |
Returns
Type | Description |
---|---|
UIPanel | A UIPanel to the resulting panel |