1init_dialog(3) Allegro manual init_dialog(3)
2
3
4
6 init_dialog - Low level initialisation of a dialog. Allegro game pro‐
7 gramming library.
8
10 #include <allegro.h>
11
12
13 DIALOG_PLAYER *init_dialog(DIALOG *dialog, int focus_obj);
14
16 This function provides lower level access to the same functionality as
17 do_dialog(), but allows you to combine a dialog box with your own pro‐
18 gram control structures. It initialises a dialog, returning a pointer
19 to a player object that can be used with update_dialog() and shut‐
20 down_dialog(). With these functions, you could implement your own ver‐
21 sion of do_dialog() with the lines:
22
23 DIALOG_PLAYER *player = init_dialog(dialog, focus_obj);
24
25 while (update_dialog(player))
26 ;
27
28 return shutdown_dialog(player);
29
30 Note that you are responsible for showing and hiding the mouse cursor,
31 which do_dialog would otherwise do for you, or saving and restoring the
32 screen contents, as popup_dialog would do for you.
33
34
36 update_dialog(3), shutdown_dialog(3), do_dialog(3)
37
38
39
40Allegro version 4.4.2 init_dialog(3)