-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathConsole.h
More file actions
55 lines (49 loc) · 1.4 KB
/
Console.h
File metadata and controls
55 lines (49 loc) · 1.4 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#ifndef __CONSOLE_H__
#define __CONSOLE_H__
#include <deque>
#include <string>
#include <sstream>
#include <windows.h>
#include "D2BS.h"
class Console {
private:
static bool visible, enabled;
static std::deque<std::wstring> lines, commands, history;
static unsigned int lineCount, lineWidth, commandPos, height, scrollIndex;
static std::wstringstream cmd;
public:
static void Toggle(void);
static void TogglePrompt(void);
static void ToggleBuffer(void);
static void Hide(void);
static void HidePrompt(void);
static void HideBuffer(void);
static void Show(void);
static void ShowPrompt(void);
static void ShowBuffer(void);
static bool IsVisible(void) {
return visible;
}
static bool IsEnabled(void) {
return enabled;
}
static unsigned int MaxWidth(void) {
return lineWidth;
}
static unsigned int Console::GetHeight(void) {
return height;
}
static void AddKey(unsigned int key);
static void ExecuteCommand(void);
static void RemoveLastKey(void);
static void PrevCommand(void);
static void NextCommand(void);
static void ScrollUp(void);
static void ScrollDown(void);
static void AddLine(std::wstring line);
static void UpdateLines(void);
static void Clear(void);
static void Draw(void);
};
#endif