d_button_proc(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– d_button_proc β€” Allegro manual πŸ’–

okay bestie, so this one lives in the Allegro game programming library, and it's literally the glow-up behind every cute little button you ever clicked in a dialog. it's a dialog procedure. it's giving main character of the UI. ✨


🌸 SYNOPSIS 🌸

#include <allegro.h>

int d_button_proc(int msg, DIALOG *d, int c);

πŸŽ€ DESCRIPTION πŸŽ€

so, <pink>d_button_proc</pink> is a button object β€” and the way it works is, the dp field points to the text string. that's where your lil button label lives. πŸ’…

you can select this button by:

  • clicking on it with the mouse πŸ–±οΈ
  • or by pressing its keyboard shortcut ⌨️

and here's the tea about the D_EXIT flag, because this part matters fr fr:

  • if D_EXIT is set, selecting the button will close the dialog β€” it's a done-deal button, periodt πŸ’€
  • if D_EXIT is not set, selecting it will toggle on and off instead πŸ”

also, just like d_text_proc(), you can use ampersands (&) to display the keyboard shortcut of the button. yesss, that classic underlined letter vibe. iconic. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹


k that's the whole page bestie, no notes, ate and left no crumbs πŸ‘‘

with love from the Allegro crew β€” version 4.4.3, and yes that's the Allegro manual, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from