91#define DIALOG_CENTER (1 << 15)
94#define DIALOG_AUTO (1 << 15)
173 uint16_t y, uint16_t w, uint16_t h, uint16_t r);
dialogOptionHint_t hints
The rendering hints for the option button.
Definition dialogBox.h:135
dialogBox_t * initDialogBox(const char *title, const char *detail, const wsg_t *icon, dialogBoxCbFn_t cbFn)
Allocate and return a new dialogBox_t with the given settings.
Definition dialogBox.c:127
void(* dialogBoxCbFn_t)(const char *label)
Definition dialogBox.h:96
bool holdA
Whether A is being held.
Definition dialogBox.h:159
node_t * selectedOption
The currently-selected option.
Definition dialogBox.h:153
const char * detail
The text in the body of the dialog box.
Definition dialogBox.h:147
dialogOptionHint_t
Hints for the dialog box renderer. Multiple options can be combined with bitwise OR.
Definition dialogBox.h:106
@ OPTHINT_DISABLED
This option should be shown, but should not be selectable.
Definition dialogBox.h:120
@ OPTHINT_NORMAL
No special options for this dialog option.
Definition dialogBox.h:108
@ OPTHINT_OK
This option is the "OK" option.
Definition dialogBox.h:111
@ OPTHINT_CANCEL
This option is the "Cancel" option, and will be selected if the user presses B.
Definition dialogBox.h:114
@ OPTHINT_DEFAULT
This option should be selected by default when the dialog resets.
Definition dialogBox.h:117
list_t options
The linked list of dialog box options.
Definition dialogBox.h:150
const wsg_t * icon
The icon, if any, to draw inside the option button.
Definition dialogBox.h:132
const char * title
The title of the dialog box to draw at the top.
Definition dialogBox.h:144
void deinitDialogBox(dialogBox_t *dialogBox)
Deallocate all memory associated with the given dialog box.
Definition dialogBox.c:144
void drawDialogBox(const dialogBox_t *dialogBox, const font_t *titleFont, const font_t *detailFont, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t r)
Draw the dialog box.
Definition dialogBox.c:426
const char * label
The text to draw in the dialog.
Definition dialogBox.h:129
bool holdB
Whether B is being held.
Definition dialogBox.h:162
void dialogBoxReset(dialogBox_t *dialogBox)
Clear all options from the given dialog box.
Definition dialogBox.c:179
void dialogBoxButton(dialogBox_t *dialogBox, const buttonEvt_t *evt)
Handle button presses for the dialog box.
Definition dialogBox.c:537
dialogBoxCbFn_t cbFn
The callback function for when an item is selected.
Definition dialogBox.h:156
void dialogBoxAddOption(dialogBox_t *dialogBox, const char *label, const wsg_t *icon, dialogOptionHint_t hints)
Add an option button to a dialog box.
Definition dialogBox.c:158
Definition dialogBox.h:127
Definition dialogBox.h:139
A font is a collection of font_ch_t for all ASCII characters. Each character has the same height and ...
Definition font.h:66
A doubly linked list with pointers to the first and last nodes.
Definition linked_list.h:87
A node in a doubly linked list with pointers to the previous and next values (which may be NULL),...
Definition linked_list.h:77
A sprite using paletteColor_t colors that can be drawn to the display.
Definition wsg.h:57