mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user