-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFEConsoleWindow.h
More file actions
40 lines (32 loc) · 1.07 KB
/
FEConsoleWindow.h
File metadata and controls
40 lines (32 loc) · 1.07 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
#pragma once
#include "SubSystems/Networking/FENetworking.h"
#include "SubSystems/Profiling/FEScopedTimer.h"
namespace FocalEngine
{
class FEConsoleWindow
{
friend class FEBasicApplication;
FEConsoleWindow(std::function<void(void* UserData)> MainFunc, void* UserData);
HWND ConsoleWindow = nullptr;
bool bConsoleInitializationStarted = false;
bool bConsoleActive = false;
void ConsoleMainFunc();
std::function<void(void* UserData)> UserConsoleMainFunc = nullptr;
void* UserConsoleMainFuncData = nullptr;
std::thread ConsoleThreadHandler;
WORD RGBToConsoleColor(int R, int G, int B) const;
public:
// Prevent copying and assignment
FEConsoleWindow(const FEConsoleWindow&) = delete;
FEConsoleWindow& operator=(const FEConsoleWindow&) = delete;
void WaitForCreation();
bool SetTitle(const std::string Title) const;
bool DisableCloseButton() const;
bool Show() const;
bool Hide() const;
bool IsHidden() const;
HWND GetHandle() const;
std::vector<char> GetConsoleTextColor() const;
void SetNearestConsoleTextColor(int R, int G, int B) const;
};
}