Method Query
Query(int, int, ustring, ustring, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)
Parameters
width
intWidth for the window.
height
intHeight for the window.
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, params ustring[] buttons)
Parameters
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.
Query(int, int, ustring, ustring, int, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)
Parameters
width
intWidth for the window.
height
intHeight for the window.
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
defaultButton
intIndex of the default button.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, int, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, int defaultButton = 0, params ustring[] buttons)
Parameters
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
defaultButton
intIndex of the default button.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.
Query(int, int, ustring, ustring, int, Border, params ustring[])
Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(int width, int height, ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)
Parameters
width
intWidth for the window.
height
intHeight for the window.
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
defaultButton
intIndex of the default button.
border
BorderThe border settings.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
Use Query(ustring, ustring, params ustring[]) instead; it automatically sizes the MessageBox based on the contents.
Query(ustring, ustring, int, Border, params ustring[])
Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
public static int Query(ustring title, ustring message, int defaultButton = 0, Border border = null, params ustring[] buttons)
Parameters
title
ustringTitle for the query.
message
ustringMessage to display, might contain multiple lines.
defaultButton
intIndex of the default button.
border
BorderThe border settings.
buttons
ustring[]Array of buttons to add.
Returns
- int
The index of the selected button, or -1 if the user pressed ESC to close the dialog.
Remarks
The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons.