-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutlib.cpp
More file actions
46 lines (41 loc) · 1.31 KB
/
outlib.cpp
File metadata and controls
46 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "outlib.h"
OutManager::OutManager()
{
};
OutManager::~OutManager()
{
};
void OutManager::printMessage(string _str)
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
for (int i = 0; i < _str.length(); i++)
{
cout << _str[i];
Sleep(100);
};
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
};
void OutManager::printMessage(int _numb)
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
char buffer[3];
_itoa_s(_numb, buffer, 3, 10);
string str = buffer;
for (int i = 0; i < str.length(); i++)
{
cout << str[i];
Sleep(100);
};
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
};
void OutManager::terminatorOut(int i, float _one_percent)
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_GREEN);
system("cls");
cout.setf(ios::fixed);
cout << "Ò-800 is making crazy math calculations. Process (" << setprecision(2) << i / _one_percent << "%) " << endl;
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
};