diff options
Autocommit at 05.05.2022 @ 21:34
1 files changed, 20 insertions, 21 deletions
| -rw-r--r-- | src/ConsoleInterface/Toolbox.cpp | 41 |
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp index 6dca150..710390e 100644 --- a/src/ConsoleInterface/Toolbox.cpp +++ b/src/ConsoleInterface/Toolbox.cpp @@ -3,7 +3,7 @@ void clear() { // Clears console on Linux // Source: https://stackoverflow.com/a/52895729/12036073 - // std::cout << u8"\033[2J\033[1;1H"; + std::cout << u8"\033[2J\033[1;1H"; } int orderedListIndex = 1; @@ -12,30 +12,12 @@ void resetOrderedList(int starter) { orderedListIndex = starter; } -void _printOrderedListBeginning() { - std::cout << "[" << orderedListIndex++ << "] "; -} - -void _printInputBoxLabel(const char* label) { - std::cout << " (+) " << label; -} - -void _printAltInputBoxLabel(const char* label) { - std::cout << "(+) " << label; -} - -void inputLineBox(const char* label, char* output, unsigned maxWidth) { - _printInputBoxLabel(label); - std::cin.ignore(); - std::cin.getline(output, maxWidth); -} - void titleBox(const char* title) { - std::cout << std::endl << "### " << title << " ###" << std::endl; + std::cout << std::endl << "=== " << title << " ===" << std::endl; } void subTitleBox(const char* title) { - std::cout << std::endl << "+#+ " << title << " +#+" << std::endl; + std::cout << std::endl << "--- " << title << " ---" << std::endl; } void successBox(const char* message) { @@ -50,3 +32,20 @@ void errorBox(const char* message) { std::cout << "<E> " << message << std::endl; } +void _printOrderedListBeginning() { + std::cout << "[" << orderedListIndex++ << "] "; +} + +void _printInputBoxLabel(const char* label) { + std::cout << " (+) " << label; +} + +void _printAltInputBoxLabel(const char* label) { + std::cout << "(+) " << label; +} + +void inputLineBox(const char* label, char* output, unsigned maxWidth) { + _printInputBoxLabel(label); + std::cin.ignore(); + std::cin.getline(output, maxWidth); +} |
