From e31944838284c7e4199e2941fcfe0fccfd5b4abf Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 7 May 2022 14:53:20 +0300 Subject: Autocommit at 07.05.2022 @ 14:53 --- src/Generic/ConsoleInterface/Toolbox.cpp | 5 +++++ src/UserInterface/VenueConsoleUI.cpp | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Generic/ConsoleInterface/Toolbox.cpp b/src/Generic/ConsoleInterface/Toolbox.cpp index 7fd64ab..ddfdd94 100644 --- a/src/Generic/ConsoleInterface/Toolbox.cpp +++ b/src/Generic/ConsoleInterface/Toolbox.cpp @@ -71,6 +71,11 @@ void inputLineSubBox(const char* label, char* output, unsigned maxWidth) { __inputLineBoxGetInput(output, maxWidth); } +void pressEnterToContinue() { + char tmp; + inputLineBox("[Press enter to continue]", &tmp, 1); +} + /* Ordered list */ int orderedListIndex = 1; diff --git a/src/UserInterface/VenueConsoleUI.cpp b/src/UserInterface/VenueConsoleUI.cpp index 8c3fdcf..63816c6 100644 --- a/src/UserInterface/VenueConsoleUI.cpp +++ b/src/UserInterface/VenueConsoleUI.cpp @@ -53,9 +53,7 @@ void command_freeSeats() { } table(1, seatsPerRow, seating.get_cstr()); - - char tmp; - inputLineBox("[Press enter to continue]", &tmp, 1); + pressEnterToContinue(); } void command_reserveTicket() { @@ -106,6 +104,7 @@ void command_buyTicket() { if (note.get_length() > 0) { successSubBox("The reservation had a note attached. It reads:"); successSubBox(note.get_cstr()); + pressEnterToContinue(); } } else if (s == W_TicketHadNotBeenReserved) { -- cgit v1.3.1-26-gb76a