d_radio_proc(3alleg4)

πŸ’– d_radio_proc πŸ’–

okay bestie, welcome to the Allegro manual β€” section 3alleg4, the lil corner of the docs where the dialog magic lives ✨


✨ NAME ✨

d_radio_proc β€” the dialog procedure that implements a radio button object, bestie. It's part of the Allegro game programming library πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

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

✨ DESCRIPTION ✨

So it's a radio button object, periodt. 🫢

Here's the tea: a dialog can contain any number of radio button groups β€” like, go off, have as many as you want. And when you select a radio button, it causes the other buttons within the same group to be deselected. That's the whole vibe: one winner per group, no sharing, main character energy only πŸ‘‘

Now the fields, because details matter:

  • The dp field points to the text string πŸ’¬
  • d1 specifies the group number β€” this is how the buttons know who their siblings are 🧚
  • d2 is the button style, and the options are:
    • 0 = circle β­•
    • 1 = square 🟦

That's it, that's the whole thing. Simple, iconic, ate πŸ’…


✨ SEE ALSO ✨


and that's the page, bestie!! 🌈 this lil writeup is from the Allegro manual, version 4.4.3 β€” slay, mwah, take care of urself and ur radio groups πŸ’–πŸŽ€πŸ¦‹πŸŒΈβ­πŸ“πŸ’œ