Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit45172556e64edac54a85f17d13a8bc6cb4f4f9d1 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-06 10:36:33 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-06 10:36:33 +0300
Files6f52417b0bb8a5d3a0f6c23d01a0bda7dfafe2ab /src
FMI-OOP-P1_TicketSystem-45172556e64edac54a85f17d13a8bc6cb4f4f9d1.tar
FMI-OOP-P1_TicketSystem-45172556e64edac54a85f17d13a8bc6cb4f4f9d1.tar.gz
FMI-OOP-P1_TicketSystem-45172556e64edac54a85f17d13a8bc6cb4f4f9d1.zip
Parente3e26c2e27d4fbd0c1af683ea2248b8e61e6663e (diff)
Autocommit at 06.05.2022 @ 10:36
2 files changed, 6 insertions, 6 deletions
-rw-r--r--src/ConsoleInterface/Toolbox.cpp10
-rw-r--r--src/VenueConsoleUI.cpp2
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp
index a47d004..5331be9 100644
--- a/src/ConsoleInterface/Toolbox.cpp
+++ b/src/ConsoleInterface/Toolbox.cpp
@@ -48,9 +48,9 @@ void __printTableColumnHeader(unsigned start, unsigned count) {
}
void __printTableLine(unsigned columns) {
- std::cout << ":---";
+ std::cout << ":===";
for (unsigned i = 0; i < columns; i++)
- std::cout << "----";
+ std::cout << "+---";
std::cout << ":" << std::endl;
}
@@ -58,14 +58,14 @@ void table(unsigned startNumber, unsigned columns, const char* items) {
__printTableColumnHeader(startNumber, columns);
__printTableHeaderNumber(startNumber);
- for (unsigned i = 0, colInd = 1, rowInd = 0; items[i] != '\0'; i++, (++colInd) %= columns) {
- if (colInd == 0) {
+ for (unsigned i = 0, colInd = 0, rowInd = 0; items[i] != '\0'; i++, (++colInd) %= columns) {
+ if (colInd == 0 && i != 0) {
std::cout << ":" << std::endl;
__printTableLine(columns);
__printTableHeaderNumber((++rowInd) + startNumber);
}
- std::cout << ((colInd == 0) ? ": " : "| ") << items[rowInd * columns + colInd] << " ";
+ std::cout << "| " << items[rowInd * columns + colInd] << " ";
}
}
diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp
index 42cca85..c18d0cd 100644
--- a/src/VenueConsoleUI.cpp
+++ b/src/VenueConsoleUI.cpp
@@ -33,7 +33,7 @@ void handleStatusCode(StatusCode sc, Menu menu) {
/* Ticket Management */
void command_freeSeats() {
- table(0, 10, " A B C D E F G ");
+ table(0, 11, " A B C D E F G ");
/*
char name[MAX_LINE_WIDTH];
inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH);