-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConIO.h
60 lines (53 loc) · 1.62 KB
/
ConIO.h
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
#ifndef __CON_IO__H
#define __CON_IO__H
#include <map>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <conio.h>
#include <string>
#include <vector>
#include <chrono>
#include <windows.h>
#include <string_view>
#include <format>
enum Color{
BLACK,
LIGHT_RED,
LIGHT_GREEN,
LIGHT_BLUE,
LIGHT_CYAN,
LIGHT_MAGENTA,
LIGHT_YELLOW,
LIGHT_GRAY,
DARK_RED,
DARK_GREEN,
DARK_BLUE,
DARK_CYAN,
DARK_MAGENTA,
DARK_YELLOW,
DARK_GRAY,
WHITE
};
char conMenu(const char* Title, std::vector<std::string>& menuList);
std::string getEsc(const std::string& col);
char choice(const std::string text, std::string validChar, char defChar=0);
int get_int (std::string col = "WhiteF", int defInt = 0);
double get_double(std::string col = "WhiteF", double defDouble = 0.0);
std::string get_string(std::string col = "WhiteF", std::string defStr = "");
void logHeader(std::ofstream& logs);
void logMix(std::ofstream& logs, std::string name, std::map<std::string, double> mix);
void logEOSin(std::ofstream& logs, std::string EOS, double P, double T, double atm);
void verbose(std::ofstream& logs, std::string print, bool cr = false);
COORD getCurPos();
void setCurPos(int x = 0 , int y = 0);
void setCurPos(COORD coordinates);
WORD GetTextColor(Color color);
void SetTextColor(Color color);
WORD GetBackgroundColor(Color color);
void SetBackgroundColor(Color color);
void clearScreen(char fill = ' ');
void MaximizeWindow();
#endif