-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScreen.h
More file actions
32 lines (27 loc) · 778 Bytes
/
Screen.h
File metadata and controls
32 lines (27 loc) · 778 Bytes
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
#pragma once
#include "Windows.h"
#include "Eigen/Eigen"
#include <string>
using Eigen::Vector2i;
class Screen
{
public:
static void Set(unsigned width, unsigned height);
static void Set(unsigned width, unsigned height, Vector2i offset);
static void SetTitle(std::string title);
static void HideCursor();
static void Render(CHAR_INFO* charInfo);
static HWND GetHandleConsole();
static Vector2i GetDesktopResolution();
static Vector2i GetPixelSize();
static Vector2i GetBufferSize();
static Vector2i GetFontSize();
private:
static inline HWND _handleConsole;
static inline HANDLE _stdHandle;
static inline Vector2i _pixelSize;
static inline Vector2i _bufferSize;
static void Init();
static void PostInit();
static Vector2i CalculateConsoleBufferSize();
};