d_button_proc(3alleg4)
β¨ d_button_proc(3alleg4) β¨
okay bestie, gather round π this one lives in the Allegro manual (yes, the game programming library, the one that eats and leaves no crumbs), and it's genuinely one of the cutest little dialog objects you'll ever meet. let's get into it π
πΈ NAME πΈ
d_button_proc β a dialog procedure that implements a button object. she's part of the Allegro game programming library π
β¨ SYNOPSIS β¨
#include <allegro.h>
int d_button_proc(int msg, DIALOG *d, int c);
π¦ DESCRIPTION π¦
so this is a button object, and the way she works is that her dp field points to the text string β that's literally where the label lives, no cap. π«Ά
you can select this button two ways, pick your fighter:
- clicking on it with the mouse π±οΈ
- pressing its keyboard shortcut β¨οΈ
now here's the part you actually need to know, bestie, because it changes everything:
if the D_EXIT flag is set, selecting the button will close the dialog. if it's not set, selecting it will just toggle on and off instead. same button, two completely different vibes. π
also, just like d_text_proc(), you can use ampersands (&) to display the keyboard shortcut of the button. iconic behavior honestly π
π SEE ALSO π
go read those too, they're giving very much "the plot thickens" πβ¨
aaaand that's the whole page, you ate that π this was Allegro version 4.4.3, dropped way back in the day and still slaying, and it's the d_button_proc(3alleg4) page from the Allegro manual. bye bestie, go press some buttons π
π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms