Website Summary Files Commits Branches @commit @diff @stats
path: root / src / ConsoleInterface / Toolbox.cpp
diff options
context:
space:
mode:
Commit0ee15e69643f75f9a6ac5a904753baa70f0e6089 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 21:34:14 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-05 21:34:14 +0300
Filesac69fbc07a192d7f51ea9369c00a46691fd8260d /src/ConsoleInterface/Toolbox.cpp
FMI-OOP-P1_TicketSystem-0ee15e69643f75f9a6ac5a904753baa70f0e6089.tar
FMI-OOP-P1_TicketSystem-0ee15e69643f75f9a6ac5a904753baa70f0e6089.tar.gz
FMI-OOP-P1_TicketSystem-0ee15e69643f75f9a6ac5a904753baa70f0e6089.zip
Parent5eb6112aaabebe5338e65f16cf4f18acc38ddf4d (diff)
Autocommit at 05.05.2022 @ 21:34
1 files changed, 20 insertions, 21 deletions
-rw-r--r--src/ConsoleInterface/Toolbox.cpp41
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);
+}