mirror of
https://github.com/PashaBibko/LX.git
synced 2026-12-02 22:07:39 +00:00
Organized project files
This commit is contained in:
1 parent
c95d91b867
commit
0a7c2c0145
16 files changed
+101
-73
No files matched your search
@@ -1,22 +0,0 @@
|
||||
#include <Console.h>
|
||||
|
||||
#include <Windows.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace LX
|
||||
{
|
||||
void PrintStringAsColor(const std::string& str, Color c)
|
||||
{
|
||||
// Gets a handle to the console //
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
// Sets the color of the console to the desired color //
|
||||
SetConsoleTextAttribute(hConsole, (WORD)c);
|
||||
|
||||
// Outputs the text //
|
||||
std::cout << str;
|
||||
|
||||
// Resets the color //
|
||||
SetConsoleTextAttribute(hConsole, (WORD)Color::LIGHT_GRAY);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user