Fix/improve TURBO_BACK_MENU_ITEM (#15856)
This commit is contained in:
committed by
Scott Lahteine
parent
776632c503
commit
b3f81eead5
@@ -463,16 +463,16 @@ public:
|
||||
static screenFunc_t currentScreen;
|
||||
static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0);
|
||||
static void save_previous_screen();
|
||||
static void goto_previous_screen(
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
const bool is_back
|
||||
#endif
|
||||
);
|
||||
|
||||
// goto_previous_screen and go_back may also be used as menu item callbacks
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
// Various menu items require a "void (*)()" to point to
|
||||
// this function so a default argument *won't* work
|
||||
static inline void goto_previous_screen() { goto_previous_screen(false); }
|
||||
static void _goto_previous_screen(const bool is_back);
|
||||
static inline void goto_previous_screen() { _goto_previous_screen(false); }
|
||||
static inline void go_back() { _goto_previous_screen(true); }
|
||||
#else
|
||||
static void _goto_previous_screen();
|
||||
FORCE_INLINE static void goto_previous_screen() { _goto_previous_screen(); }
|
||||
FORCE_INLINE static void go_back() { _goto_previous_screen(); }
|
||||
#endif
|
||||
|
||||
static void return_to_status();
|
||||
|
||||
Reference in New Issue
Block a user