1
0
forked from me/IronOS

Pause for the last value in settings menus and blink the scroll thumb

This radically slows down auto-incrementing (when the change button is
kept pressed) of values when user reaches the maximum (last) allowed
option. The scrollbar thumb is blinking to indicate to the user that the
next keypress will wraparound (unless this value was already active
prior to entering menu).

Fixes #536.
This commit is contained in:
Paul Fertser
2020-06-21 21:59:31 +03:00
parent 1d63a3d7bc
commit a2a23b575f
2 changed files with 190 additions and 152 deletions

View File

@@ -19,16 +19,12 @@
//Declarations for all the methods for the settings menu (at end of this file)
//Wrapper for holding a function pointer
typedef struct state_func_t {
void (*func)(void);
} state_func;
//Struct for holding the function pointers and descriptions
typedef struct {
const char *description;
const state_func incrementHandler;
const state_func draw;
// return true if increment reached the maximum value
bool (* const incrementHandler)(void);
void (* const draw)(void);
} menuitem;
void enterSettingsMenu();