alert(3alleg4)

alert3alleg4

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

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.