Blitz3D+ Command Reference

Confirm ( text$[,serious] )

Parameters

text$ - message to display

serious (optional) - True shows a warning icon instead of the information icon; False (default)

Description

Shows a modal OK/Cancel requester and returns 1 for OK, 0 for Cancel.

Requires Extended language mode.

Pops up a native message box titled Blitz3D+ with OK and Cancel buttons and waits for the user's answer - the classic "Are you sure?" check before overwriting a save file or deleting the selected objects. Pass serious=True to swap the information icon for a warning icon when the action is destructive.

The requester is owned by the active GUI window (or the main program window when no GUI window exists), and the message text is UTF-8 like all GUI text. While it is open, application begin-modal ($2004) and end-modal ($2005) events are queued so the rest of your program can tell a modal interruption happened.

For a plain notice with just an OK button use Notify; for a three-way Yes/No/Cancel choice use Proceed.

The world editor shell sample shows the application shell requesters like this belong to.

See also: Notify, Proceed, RequestFile, RequestDir, RequestColor, RequestFont.

Index