From 1c4200a73a97f3636ef21e2904d44b923fdc473f Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Thu, 14 Aug 2025 10:18:02 -0400 Subject: [PATCH] Version v0.2.67 - Enhanced UI - added Q for quit and improved pad generation flow --- otp.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/otp.c b/otp.c index 0fe4480..3e7748d 100644 --- a/otp.c +++ b/otp.c @@ -158,6 +158,7 @@ int interactive_mode(void) { handle_pads_menu(); break; case 'X': + case 'Q': printf("Goodbye!\n"); return 0; default: @@ -3045,10 +3046,15 @@ int handle_pads_menu(void) { char input[10]; if (fgets(input, sizeof(input), stdin)) { - char choice = toupper(input[0]); - if (choice == 'G') { - return handle_generate_menu(); + char choice = toupper(input[0]); + if (choice == 'G') { + int result = handle_generate_menu(); + if (result == 0) { + // After successful pad generation, return to pads menu + return handle_pads_menu(); } + return result; + } } return 0; } @@ -3117,7 +3123,12 @@ int handle_pads_menu(void) { // Handle actions first if (toupper(input[0]) == 'G') { - return handle_generate_menu(); + int result = handle_generate_menu(); + if (result == 0) { + // After successful pad generation, return to pads menu + return handle_pads_menu(); + } + return result; } else if (toupper(input[0]) == 'B') { return 0; // Back to main menu }