From d5ff44b2802b77e461a69018a20a75f41f7cbb1a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 7 May 2022 15:18:23 +0300 Subject: Autocommit at 07.05.2022 @ 15:18 --- src/Generic/ConsoleInterface/Toolbox.cpp | 4 ++-- src/Generic/ConsoleInterface/Toolbox.hpp | 6 +++--- src/UserInterface/VenueConsoleUI.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Generic/ConsoleInterface/Toolbox.cpp b/src/Generic/ConsoleInterface/Toolbox.cpp index 49d4360..78ca240 100644 --- a/src/Generic/ConsoleInterface/Toolbox.cpp +++ b/src/Generic/ConsoleInterface/Toolbox.cpp @@ -72,9 +72,9 @@ void inputLineSubBox(const char* label, char* output, unsigned maxWidth, bool ig __inputLineBoxGetInput(output, maxWidth, ignore); } -void pressEnterToContinue() { +void pressEnterToContinue(bool ignore) { char tmp; - inputLineBox("[Press enter to continue]", &tmp, 1); + inputLineBox("[Press enter to continue]", &tmp, 1, ignore); } /* Ordered list */ diff --git a/src/Generic/ConsoleInterface/Toolbox.hpp b/src/Generic/ConsoleInterface/Toolbox.hpp index 98a2002..a1a310b 100644 --- a/src/Generic/ConsoleInterface/Toolbox.hpp +++ b/src/Generic/ConsoleInterface/Toolbox.hpp @@ -16,9 +16,9 @@ void warningSubBox(const char* message); void errorBox(const char* message); void errorSubBox(const char* message); -void inputLineBox(const char* label, char* output, unsigned maxWidth); -void inputLineSubBox(const char* label, char* output, unsigned maxWidth); -void pressEnterToContinue(); +void inputLineBox(const char* label, char* output, unsigned maxWidth, bool ignore = true); +void inputLineSubBox(const char* label, char* output, unsigned maxWidth, bool ignore = true); +void pressEnterToContinue(bool ignore = true); void resetOrderedList(int starter = 1); diff --git a/src/UserInterface/VenueConsoleUI.cpp b/src/UserInterface/VenueConsoleUI.cpp index 63816c6..043ea81 100644 --- a/src/UserInterface/VenueConsoleUI.cpp +++ b/src/UserInterface/VenueConsoleUI.cpp @@ -66,7 +66,7 @@ void command_reserveTicket() { char password[PASSWORD_LEN]; inputLineSubBox("Enter password [Max 8 characters]: ", password, PASSWORD_LEN); char note[NOTE_LEN]; - inputLineSubBox("Enter note [Max 32 characters]: ", note, NOTE_LEN); + inputLineSubBox("Enter note [Max 32 characters]: ", note, NOTE_LEN, false); StatusCode s = es->reserveTicket(name, date, password, note, tic); handleStatusCode(s, ticketManagementMenu); -- cgit v1.3.1-23-gd82d