add center flag

This commit is contained in:
finbargiusti 2025-07-08 19:36:19 +01:00
parent 0a38d45abb
commit c417daa0a0
3 changed files with 28 additions and 8 deletions

10
menu.h
View file

@ -27,10 +27,18 @@ struct page {
struct page *next; // next page
};
enum e_position {
POSITION_TOP,
POSITION_BOTTOM,
POSITION_CENTER,
};
typedef enum e_position POSITION;
// Menu state.
struct menu {
// Whether the menu appears at the bottom of the screen
bool bottom;
POSITION position;
// The function used to match menu items
int (*strncmp)(const char *, const char *, size_t);
// Whether the input is a password