🧑‍💻 Apply F() to some LCD / TFT strings

Followup to #24228
This commit is contained in:
Scott Lahteine
2022-06-13 20:43:23 -05:00
parent 0ff3018fd2
commit 640282b8dc
20 changed files with 160 additions and 109 deletions

View File

@@ -113,11 +113,15 @@ class MenuItem_confirm : public MenuItemBase {
static void select_screen(
FSTR_P const yes, FSTR_P const no,
selectFunc_t yesFunc, selectFunc_t noFunc,
FSTR_P const pref, FSTR_P const string, FSTR_P const suff=nullptr
FSTR_P const pref, FSTR_P const fstr, FSTR_P const suff=nullptr
) {
char str[strlen_P(FTOP(string)) + 1];
strcpy_P(str, FTOP(string));
select_screen(yes, no, yesFunc, noFunc, pref, str, suff);
#ifdef __AVR__
char str[strlen_P(FTOP(fstr)) + 1];
strcpy_P(str, FTOP(fstr));
select_screen(yes, no, yesFunc, noFunc, pref, str, suff);
#else
select_screen(yes, no, yesFunc, noFunc, pref, FTOP(fstr), suff);
#endif
}
// Shortcut for prompt with "NO"/ "YES" labels
FORCE_INLINE static void confirm_screen(selectFunc_t yesFunc, selectFunc_t noFunc, FSTR_P const pref, const char * const string=nullptr, FSTR_P const suff=nullptr) {