adime_d_button_proc(3)

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

πŸ’– adime_d_button_proc πŸ’–

okay bestie, so this one lives in the Adime API Reference, and it's the glow-up version of a button β€” same energy as Allegro's own button proc but with that extra 3d-ish sparkle ✨


✨ NAME ✨

adime_d_button_proc β€” the 3d-ified dialog button procedure, fr fr πŸ’…


🌸 SYNOPSIS 🌸

#include <adime.h>

int adime_d_button_proc(int msg, DIALOG *d, int c)

πŸŽ€ DESCRIPTION πŸŽ€

So it's similar to Allegro's d_button_proc(), except it's serving 3d-ish style β€” it's giving depth, it's giving dimension, it's giving main character button energy πŸ‘‘

But heads up, it also behaves a little differently, and this is the part where you gotta pay attention bestie:

Unlike d_button_proc(), the D_EXIT flag has <b>no effect</b> here. Don't even try it. It literally does nothing. πŸ’€

Instead, you set the d1 field to one of three constants, and that's what tells the button how to act:

  • ADIME_BUTTON_TOGGLE β€” the button is basically a check box now 🎚️ like, when you click it, it toggles back and forth between being in and being out. Vibes on, vibes off.
  • ADIME_BUTTON_EXIT β€” click it and boom, the button exits the dialog πŸšͺ bye bestie, the dialog is done.
  • ADIME_BUTTON_CALLBACK β€” if you hand it a callback function in the dp2 field, that function gets called every single time the button is clicked πŸ”₯ This callback needs to have the form:
int my_callback(DIALOG *d)

and its return value gets passed straight back to the dialog manager 🫢 that's the whole loop, that's the cycle, that's iconic.


lowkey that's the whole page?? it's a short one but every word ate πŸ’–

so yeah β€” this was adime_d_button_proc(3) from the Adime docs, and the whole thing is chilling at version 2.2.1 ⭐ catch you in the next manpage bestie, mwah πŸŽ€πŸ’œ

πŸ“¦ where this page comes from