init_dialog(3alleg)

init_dialog3alleg

Low level initialisation of a dialog. allegro game programming library.

Usage

#include <allegro.h>

DIALOG_PLAYER *init_dialog(DIALOG *dialog, int focus_obj);

Overview

This function provides lower level access to the same functionality as do_dialog(), but allows you to combine a dialog box with your own program control structures. It initialises a dialog, returning a pointer to a player object that can be used with update_dialog() and shutdown_dialog(). With these functions, you could implement your own version of do_dialog() with the lines:

   DIALOG_PLAYER *player = init_dialog(dialog, focus_obj);
   while (update_dialog(player))
      ;
   return shutdown_dialog(player);

Note that you are responsible for showing and hiding the mouse cursor, which do_dialog would otherwise do for you, or saving and restoring the screen contents, as popup_dialog would do for you.

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.