forked from noah-/d2bs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Console.h
48 lines (41 loc) · 1.16 KB
/
Console.h
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
#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::string> lines, commands,history;
static unsigned int lineCount, commandPos, height , scrollIndex;
static std::stringstream 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 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::string line);
static void UpdateLines(void);
static void Clear(void);
static void Draw(void);
static unsigned int GetHeight(void);
};
#endif