From 29e5832f4cd81163fde9848eccaa72b211c08f95 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 6 May 2022 10:11:25 +0300 Subject: Autocommit at 06.05.2022 @ 10:11 --- src/ConsoleInterface/Toolbox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ConsoleInterface/Toolbox.cpp') diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp index d9e19a3..c74332b 100644 --- a/src/ConsoleInterface/Toolbox.cpp +++ b/src/ConsoleInterface/Toolbox.cpp @@ -46,7 +46,8 @@ void __printTableColumnHeader(unsigned start, unsigned count) { } void __printTableLine(unsigned columns) { - for (unsigned i = 0; i < columns; i++) + std::cout << "...+"; + for (unsigned i = 1; i < columns; i++) std::cout << "----"; std::cout << "-" << std::endl; } @@ -54,7 +55,10 @@ void __printTableLine(unsigned columns) { void table(unsigned startNumber, unsigned columns, const char* items) { __printTableColumnHeader(startNumber, columns); - for (unsigned i = 0, colInd = 0, rowInd = 0; items[i] != '\0'; i++, (++colInd) %= columns) { + + __printTableLine(columns); + __printTableHeaderNumber(startNumber); + for (unsigned i = 0, colInd = 1, rowInd = 0; items[i] != '\0'; i++, (++colInd) %= columns) { if (colInd == 0) { std::cout << "|" << std::endl; __printTableLine(columns); -- cgit v1.3.1-23-gd82d