Browse Source

More menu header fu

Scott Lahteine 3 years ago
parent
commit
ec02aee46c
2 changed files with 10 additions and 10 deletions
  1. 10
    0
      Marlin/src/lcd/menu/menu.h
  2. 0
    10
      Marlin/src/lcd/menu/menu_item.h

+ 10
- 0
Marlin/src/lcd/menu/menu.h View File

@@ -79,6 +79,16 @@ class MenuItem_static : public MenuItemBase {
79 79
     static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr);
80 80
 };
81 81
 
82
+// BACK_ITEM(LABEL)
83
+class MenuItem_back : public MenuItemBase {
84
+  public:
85
+    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr) {
86
+      _draw(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]);
87
+    }
88
+    // Back Item action goes back one step in history
89
+    FORCE_INLINE static void action(PGM_P const=nullptr) { ui.go_back(); }
90
+};
91
+
82 92
 // CONFIRM_ITEM(LABEL,Y,N,FY,FN,...),
83 93
 // YESNO_ITEM(LABEL,FY,FN,...)
84 94
 class MenuItem_confirm : public MenuItemBase {

+ 0
- 10
Marlin/src/lcd/menu/menu_item.h View File

@@ -33,16 +33,6 @@ void lcd_move_z();
33 33
 ///////////// Base Menu Items //////////////
34 34
 ////////////////////////////////////////////
35 35
 
36
-// BACK_ITEM(LABEL)
37
-class MenuItem_back : public MenuItemBase {
38
-  public:
39
-    FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr) {
40
-      _draw(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]);
41
-    }
42
-    // Back Item action goes back one step in history
43
-    FORCE_INLINE static void action(PGM_P const=nullptr) { ui.go_back(); }
44
-};
45
-
46 36
 // SUBMENU(LABEL, screen_handler)
47 37
 class MenuItem_submenu : public MenuItemBase {
48 38
   public:

Loading…
Cancel
Save