d_radio_proc(3)

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

πŸ’– d_radio_proc πŸ’–

okay bestie, so this is a page straight out of the Allegro manual β€” like, the game programming library, you know the one πŸŽ€ β€” and it's all about one lil' function called d_radio_proc. She's a dialog procedure that implements a radio button object. yes. the little circle-y ones. iconic behaviour. ✨


✨ SYNOPSIS ✨

#include <allegro.h>

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

like. that's the whole signature. she's not complicated, she's just that girl. πŸ’…


🌸 DESCRIPTION 🌸

so basically: a radio button object. that's her. that's the vibe. πŸ¦‹

A dialog can contain any number of radio button groups β€” no cap, as many as you want. And the way it works? Selecting a radio button causes the other buttons within the same group to be deselected. so only one can be the main character per group at a time, periodt. πŸ‘‘

Here's the breakdown of the fields, and yes you need to know all of them:

  • The dp field points to the text string. that's the label, bestie, that's what everyone reads. πŸŽ€
  • d1 specifies the group number. this is how the buttons know who their siblings are β€” same number, same group, same drama. πŸ’œ
  • d2 is the button style:
    • 0 = circle
    • 1 = square

circle for the classic look, square if you're feeling a little different. both valid. both slay. πŸ”₯

no notes, no hidden behaviour, that's genuinely the whole thing. she's simple and she's perfect for it. 🌈

πŸ‘€ SEE ALSO πŸ‘€

  • exgui(3) β€” go look at the example, it'll click immediately, i promise. 🫢

and that's the page!! version 4.4.3 of the Allegro manual, by Allegro, and this was d_radio_proc(3) β€” mwah, go build something cute with it bestie, ily, bye!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from