Website Summary Files Commits Branches @commit @diff @stats
path: root / src / ConsoleInterface / Toolbox.cpp
diff options
context:
space:
mode:
1 files changed, 6 insertions, 2 deletions
-rw-r--r--src/ConsoleInterface/Toolbox.cpp8
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);