inputDialog

fnstring inputDialog(string message, string defaultValue = null)

Shows a text input dialog.

Parameters

messageThe prompt message
defaultValueDefault input value (optional)

Returns

The entered text, or null if cancelled

Example:

string name = inputDialog("Enter your name:", "Anonymous");
if (name !is null) {
    writeln("Hello, ", name);
}