diff options
3 files changed, 4 insertions, 5 deletions
| -rw-r--r-- | src/Generic/ConsoleInterface/Toolbox.cpp | 6 | ||||
| -rw-r--r-- | src/UserInterface/UserInterface.cpp | 2 | ||||
| -rw-r--r-- | src/main.cpp | 1 |
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<String>& 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(); } |
