Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
edmond-chow authored Jun 7, 2024
1 parent b20ec3a commit a3dfa16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ namespace CmplxConExt
void SetForegroundColor(ConsoleColor Color) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), static_cast<WORD>(Color) + static_cast<WORD>(GetBackgroundColor()) * 16); };
void SetBackgroundColor(ConsoleColor Color) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), static_cast<WORD>(GetForegroundColor()) + static_cast<WORD>(Color) * 16); };
void SetTitle(const std::wstring& Text) { SetConsoleTitleW(Text.c_str()); };
void PressAnyKey()
{
std::fflush(stdout);
wint_t result = _getwch();
};
void Clear()
{
COORD TopLeft{ 0, 0 };
Expand All @@ -71,7 +76,6 @@ namespace CmplxConExt
FillConsoleOutputAttribute(Console, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE, Screen.dwSize.X * Screen.dwSize.Y, TopLeft, &Written);
SetConsoleCursorPosition(Console, TopLeft);
};
void PressAnyKey() { wint_t ret = _getwch(); };
}
int main()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ namespace CmplxConExt
void SetForegroundColor(ConsoleColor Color);
void SetBackgroundColor(ConsoleColor Color);
void SetTitle(const std::wstring& Text);
void Clear();
void PressAnyKey();
void Clear();
}

0 comments on commit a3dfa16

Please sign in to comment.