From 0ee15e69643f75f9a6ac5a904753baa70f0e6089 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 5 May 2022 21:34:14 +0300 Subject: Autocommit at 05.05.2022 @ 21:34 --- src/ConsoleInterface/Toolbox.cpp | 41 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'src/ConsoleInterface/Toolbox.cpp') 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 << " " << 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); +} -- cgit v1.3.1-23-gd82d