init_dialog(3alleg4)

πŸ’– init_dialog β€” the Allegro manual, but make it a group chat πŸ’–

okay bestie, welcome to the Allegro manual, section 3alleg4 β€” yes we're deep in the 3alleg4 section and it's giving library documentation realness. today's main character? init_dialog. let's go πŸ¦‹


✨ NAME ✨

init_dialog β€” the low level initialisation of a dialog, brought to you by the Allegro game programming library. no cap. πŸ’…


✨ SYNOPSIS ✨

#include <allegro.h>

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

✨ DESCRIPTION ✨

so basically, this function hands you lower level access to the exact same functionality that do_dialog() gives you β€” except it lets you combine a dialog box with your own program control structures. iconic behavior honestly. πŸŽ€

it initialises a dialog, and it returns a pointer to a player object that you can use with update_dialog() and shutdown_dialog(). and with these functions, bestie, you could literally implement your own version of do_dialog() with these lines right here:

DIALOG_PLAYER *player = init_dialog(dialog, focus_obj);

while (update_dialog(player))
   ;

return shutdown_dialog(player);
πŸ’€ NOT ME FORGETTING TO TELL YOU: you are responsible for showing and hiding the mouse cursor β€” which do_dialog would otherwise do for you β€” or for saving and restoring the screen contents, the way popup_dialog would do for you. that's on you, girlie. no one else is coming to save you on this one. πŸ™ˆ

✨ SEE ALSO ✨


and that's the whole vibe check, bestie β€” this page is from the Allegro manual, version 4.4.3, and the original footer was literally just Allegro + version 4.4.3 + init_dialog(3alleg4), so consider this your cute little sign-off: go forth, init your dialogs, and remember to handle that mouse cursor yourself. mwah. πŸ’–πŸ‘‘πŸŒΈ