From 572034064bc8579cda9cebb28e657c79e5c96e3d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 7 May 2022 11:02:43 +0300 Subject: Autocommit at 07.05.2022 @ 11:02 --- src/Generic/ConsoleInterface/Menu.cpp | 8 ++++---- src/UserInterface/VenueConsoleUI.cpp | 4 ++-- src/main.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Generic/ConsoleInterface/Menu.cpp b/src/Generic/ConsoleInterface/Menu.cpp index 0b27d48..d672540 100644 --- a/src/Generic/ConsoleInterface/Menu.cpp +++ b/src/Generic/ConsoleInterface/Menu.cpp @@ -27,7 +27,7 @@ enum MessageType { Warning, Error, }; -String msg; +const char* msg; MessageType msgType; void Menu::registerError(const char* message) const { @@ -61,9 +61,9 @@ void Menu::navigate() const { titleBox(title); switch(msgType) { - case Error: errorBox(msg.get_cstr()); msgType = NoPrint; break; - case Warning: warningBox(msg.get_cstr()); msgType = NoPrint; break; - case Success: successBox(msg.get_cstr()); msgType = NoPrint; break; + case Error: errorBox(msg); msgType = NoPrint; break; + case Warning: warningBox(msg); msgType = NoPrint; break; + case Success: successBox(msg); msgType = NoPrint; break; case NoPrint: printLine(""); break; } printLine(""); diff --git a/src/UserInterface/VenueConsoleUI.cpp b/src/UserInterface/VenueConsoleUI.cpp index 86cae18..3856c77 100644 --- a/src/UserInterface/VenueConsoleUI.cpp +++ b/src/UserInterface/VenueConsoleUI.cpp @@ -65,9 +65,9 @@ void command_reserveTicket() { Ticket tic; inputSubBox("Enter row and seat: ", &tic); char password[PASSWORD_LEN]; - inputSubBox("Enter password [Max 8 characters]: ", &password); + inputLineSubBox("Enter password [Max 8 characters]: ", password, PASSWORD_LEN); char note[NOTE_LEN]; - inputLineSubBox("Enter note [Max 32 characters]: ", ¬e, NOTE_LEN); + inputLineSubBox("Enter note [Max 32 characters]: ", note, NOTE_LEN); StatusCode s = es->reserveTicket(name, date, password, note, tic); handleStatusCode(s, ticketManagementMenu); diff --git a/src/main.cpp b/src/main.cpp index 738205d..d5cde81 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,8 +6,8 @@ int main() { Hall myVenueHalls[] = { Hall(1, 20, 30), Hall(2, 15, 15), Hall(3, 10, 20) }; - EventService es; HallService hs(myVenueHalls, 3); + EventService es(&hs); runUI(&es, &hs); } -- cgit v1.3.1-26-gb76a