gui_shadow_box_proc(3alleg4)

πŸ’– gui_shadow_box_proc β€” the Allegro manual, but make it cute πŸ’–

okay bestie, welcome to the 3alleg4 section of the Allegro manual. this one's short but it's lowkey powerful β€” it's the whole "make your dialogs look however you want" hook situation. let's get into it 🫢


✨ NAME ✨

gui_shadow_box_proc, gui_ctext_proc, gui_button_proc, gui_edit_proc, gui_list_proc, gui_text_list_proc β€” these are the hooks you use to customise the look and feel of Allegro dialogs. that's it, that's the whole gig. six little function pointers, infinite main character energy πŸ‘‘


🌸 SYNOPSIS 🌸

#include <allegro.h>

extern int (*gui_shadow_box_proc)(int msg, struct DIALOG *d, int c);

extern int (*gui_ctext_proc)(int msg, struct DIALOG *d, int c);

extern int (*gui_button_proc)(int msg, struct DIALOG *d, int c);

extern int (*gui_edit_proc)(int msg, struct DIALOG *d, int c);

extern int (*gui_list_proc)(int msg, struct DIALOG *d, int c);

extern int (*gui_text_list_proc)(int msg, struct DIALOG *d, int c);

so yeah β€” six pointers, all the exact same signature: they take an int msg, a struct DIALOG *d, and an int c, and they hand you back an int. copy that shape exactly or the compiler will simply not let you have your moment 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

If set, these functions will be used by the standard Allegro dialogs. πŸ’…

That's the whole vibe: you point these at your own functions, and boom β€” the built-in dialogs start calling your code instead of the default drawing routines. This allows you to customise the look and feel, much like gui_fg_color and gui_bg_color, but much more flexibly. ✨

like, <pink>fg and bg colour</pink> is you picking a colour palette. <purple>this</purple> is you getting the keys to the whole house. no cap.

heads up bestie: it literally says "If set" β€” these are hooks, so nothing magical happens until you actually assign them. unset pointers = standard behaviour, periodt.

πŸ‘€ SEE ALSO πŸ‘€

go read those next, they're all in the same friend group πŸ“


and that's the page, babe πŸ’œ this was Allegro, version 4.4.3, living in the gui_shadow_box_proc(3alleg4) corner of the manual. ty for coming to my ted talk, now go make some unreasonably pretty dialogs 🌈✨