Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Use ftpl for item strings (#26462)
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 authored and thinkyhead committed Nov 25, 2023
1 parent 924d776 commit 20a26d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Marlin/src/lcd/menu/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ class MenuItemBase {
// Implementation-specific:
// Draw an item either selected (pre_char) or not (space) with post_char
// Menus may set up itemIndex, itemStringC/F and pass them to string-building or string-emitting functions
static void _draw(const bool sel, const uint8_t row, FSTR_P const fstr, const char pre_char, const char post_char);
static void _draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char pre_char, const char post_char);

// Draw an item either selected ('>') or not (space) with post_char
FORCE_INLINE static void _draw(const bool sel, const uint8_t row, FSTR_P const fstr, const char post_char) {
_draw(sel, row, fstr, '>', post_char);
FORCE_INLINE static void _draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char post_char) {
_draw(sel, row, ftpl, '>', post_char);
}
};

Expand All @@ -82,8 +82,8 @@ class MenuItem_static : public MenuItemBase {
// BACK_ITEM(LABEL)
class MenuItem_back : public MenuItemBase {
public:
FORCE_INLINE static void draw(const bool sel, const uint8_t row, FSTR_P const fstr) {
_draw(sel, row, fstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]);
FORCE_INLINE static void draw(const bool sel, const uint8_t row, FSTR_P const ftpl) {
_draw(sel, row, ftpl, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]);
}
// Back Item action goes back one step in history
FORCE_INLINE static void action(FSTR_P const=nullptr) { ui.go_back(); }
Expand Down

0 comments on commit 20a26d5

Please sign in to comment.