alert(3alleg)

alert3alleg

Displays a popup alert box. allegro game programming library.

Usage

#include <allegro.h>

int alert(const char *s1, *s2, *s3, const char *b1, *b2, int c1, c2);

Overview

Displays a popup alert box, containing three lines of text (s1-s3), and with either one or two buttons. The text for these buttons is passed in `b1' and `b2' (`b2' may be NULL), and the keyboard shortcuts in `c1' and `c2' as ASCII value. Example:

   if (!exists(CONFIG_FILE))
      alert(CONFIG_FILE, "not found.", "Using defaults.",
            "&Continue", NULL, 'c', 0);

Return value

Returns 1 or 2 depending on which button was clicked. If the alert is dismissed by pressing ESC when ESC is not one of the keyboard shortcuts, it treats it as a click on the second button (this is consistent with the common "Ok", "Cancel" alert).

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.