-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUtility.h
More file actions
66 lines (56 loc) · 1.99 KB
/
Utility.h
File metadata and controls
66 lines (56 loc) · 1.99 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef INFO_SYSTEM_CPP_UTILITY_H
#define INFO_SYSTEM_CPP_UTILITY_H
#include <chrono>
#include <iostream>
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <conio.h>
#include <windows.h>
#include <vector>
#include <cstdio>
#include <thread>
#include <functional>
#include <sstream>
#include <fstream>
#include <string>
#include <iomanip>
#include <typeinfo>
#define WIN32_LEAN_AND_MEAN //wtf is that?
#define wait getch()
#define TurnRed SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 4)
#define TurnMagenta SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 5)
#define TurnYellow SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 6)
#define TurnAqua SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 3)
#define TurnBrightAqua SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 11)
#define TurnWhite SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7)
#define TurnBlack SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 0)
#define TurnGreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2)
#define TurnBackGreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 32)
#define VK_BKSPC 0x08
#define VK_RETURN 0x0D
#define VK_SPACE 0x20
#define VK_PRIOR 0x21
#define VK_NEXT 0x22
#define VK_END 0x23
#define VK_HOME 0x24
#define VK_LEFT 0x25
#define VK_UP 0x26
#define VK_RIGHT 0x27
#define VK_DOWN 0x28
#define VK_F11 0x7A
#define VK_F12 0x7B
#define VK_DELETE 0x2E
#define MAX_INPUT "12345678"
#define MAX_INDEX "9"
using namespace std::this_thread;
using namespace std::chrono;
using namespace std;
void InitializeSettings();
void gotoxy(int x, int y);
string KeyCheck(int Key);
bool in_range(char *buff, const char *max);
void AdvancedOutputToXY(int x, int y, string str = "", WINBOOL Color = TurnWhite);
void AdvancedOutputToXY(int x, int y, WINBOOL Color = TRUE, string str = "");
void AdvancedOutputToXY(int x, int y, WINBOOL Color, int num);
std::vector<std::string> split(std::string s, std::string delimiter);
#endif //INFO_SYSTEM_CPP_UTILITY_H