Pārlūkot izejas kodu

Fix games menu back item, titles

Scott Lahteine 4 gadus atpakaļ
vecāks
revīzija
832321f55d

+ 7
- 1
Marlin/src/lcd/menu/menu_game.cpp Parādīt failu

@@ -29,7 +29,13 @@
29 29
 
30 30
 void menu_game() {
31 31
   START_MENU();
32
-  BACK_ITEM(MSG_MAIN);
32
+  BACK_ITEM(
33
+    #if ENABLED(LCD_INFO_MENU)
34
+      MSG_INFO_MENU
35
+    #else
36
+      MSG_MAIN
37
+    #endif
38
+  );
33 39
   #if ENABLED(MARLIN_BRICKOUT)
34 40
     SUBMENU(MSG_BRICKOUT, brickout.enter_game);
35 41
   #endif

+ 16
- 13
Marlin/src/lcd/menu/menu_info.cpp Parādīt failu

@@ -302,19 +302,22 @@ void menu_info() {
302 302
       SKIP_ITEM();
303 303
       SKIP_ITEM();
304 304
     #endif
305
-    SUBMENU(MSG_GAMES, (
306
-      #if HAS_GAME_MENU
307
-        menu_game
308
-      #elif ENABLED(MARLIN_BRICKOUT)
309
-        brickout.enter_game
310
-      #elif ENABLED(MARLIN_INVADERS)
311
-        invaders.enter_game
312
-      #elif ENABLED(MARLIN_SNAKE)
313
-        snake.enter_game
314
-      #elif ENABLED(MARLIN_MAZE)
315
-        maze.enter_game
316
-      #endif
317
-    ));
305
+    // Game sub-menu or the individual game
306
+    {
307
+      SUBMENU(
308
+        #if HAS_GAME_MENU
309
+          MSG_GAMES, menu_game
310
+        #elif ENABLED(MARLIN_BRICKOUT)
311
+          MSG_BRICKOUT, brickout.enter_game
312
+        #elif ENABLED(MARLIN_INVADERS)
313
+          MSG_INVADERS, invaders.enter_game
314
+        #elif ENABLED(MARLIN_SNAKE)
315
+          MSG_SNAKE, snake.enter_game
316
+        #elif ENABLED(MARLIN_MAZE)
317
+          MSG_MAZE, maze.enter_game
318
+        #endif
319
+      );
320
+    }
318 321
   #endif
319 322
 
320 323
   END_MENU();

+ 17
- 13
Marlin/src/lcd/menu/menu_main.cpp Parādīt failu

@@ -271,20 +271,24 @@ void menu_main() {
271 271
     #if ENABLED(GAMES_EASTER_EGG)
272 272
       SKIP_ITEM();
273 273
       SKIP_ITEM();
274
+      SKIP_ITEM();
274 275
     #endif
275
-    SUBMENU(MSG_GAMES, (
276
-      #if HAS_GAME_MENU
277
-        menu_game
278
-      #elif ENABLED(MARLIN_BRICKOUT)
279
-        brickout.enter_game
280
-      #elif ENABLED(MARLIN_INVADERS)
281
-        invaders.enter_game
282
-      #elif ENABLED(MARLIN_SNAKE)
283
-        snake.enter_game
284
-      #elif ENABLED(MARLIN_MAZE)
285
-        maze.enter_game
286
-      #endif
287
-    ));
276
+    // Game sub-menu or the individual game
277
+    {
278
+      SUBMENU(
279
+        #if HAS_GAME_MENU
280
+          MSG_GAMES, menu_game
281
+        #elif ENABLED(MARLIN_BRICKOUT)
282
+          MSG_BRICKOUT, brickout.enter_game
283
+        #elif ENABLED(MARLIN_INVADERS)
284
+          MSG_INVADERS, invaders.enter_game
285
+        #elif ENABLED(MARLIN_SNAKE)
286
+          MSG_SNAKE, snake.enter_game
287
+        #elif ENABLED(MARLIN_MAZE)
288
+          MSG_MAZE, maze.enter_game
289
+        #endif
290
+      );
291
+    }
288 292
   #endif
289 293
 
290 294
   END_MENU();

Notiek ielāde…
Atcelt
Saglabāt