From 8fe5955772e0c10f22a8f6e40616ce79b2e88491 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 09:04:09 +0300 Subject: Autocommit at 29.05.2022 @ 09:04 --- src/Generic/ConsoleInterface/Toolbox.cpp | 6 ++---- src/UserInterface/UserInterface.cpp | 2 +- src/main.cpp | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Generic/ConsoleInterface/Toolbox.cpp b/src/Generic/ConsoleInterface/Toolbox.cpp index 1723c58..64649e9 100644 --- a/src/Generic/ConsoleInterface/Toolbox.cpp +++ b/src/Generic/ConsoleInterface/Toolbox.cpp @@ -46,7 +46,6 @@ void __printTableLine(unsigned columns) { } void __printPadded(const String& str, unsigned width) { - std::cout << width << " " << str.get_length(); while (width - str.get_length() > 0) { width--; print(" "); @@ -78,12 +77,11 @@ void printTable(const List& items, unsigned columns) { for (unsigned i = 0; i < items.get_count(); i++) { __printPadded(items[i], colWidths[i % columns]); - if (i > 0 && i % columns == 0) + if (i % columns == columns - 1) printLine(""); - else if (i % columns > 0 && i % columns < columns - 1) + else if (i % columns > 0) print("|"); } - printLine(""); delete[] colWidths; } diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index b456e97..5e9ef00 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -14,7 +14,7 @@ void UserInterface::com_print(const char* params) { } void UserInterface::com_edit(const char* params) { - //TODO + while (*params == ' ') params++; } /* Public */ diff --git a/src/main.cpp b/src/main.cpp index a5d47a3..9cff886 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ int main() { Table table(5, 5); table.putCell(0, 0, "Test"); + table.putCell(1, 0, "3"); UserInterface ui(&table); ui.run(); } -- cgit v1.3.1-26-gb76a