forked from fengjixuchui/XHOOK-WoW-1.12.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsole.h
45 lines (38 loc) · 1.06 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
#pragma once
enum CommandCategory
{
CATEGORY_DEBUG = 0x0,
CATEGORY_GRAPHICS = 0x1,
CATEGORY_CONSOLE = 0x2,
CATEGORY_COMBAT = 0x3,
CATEGORY_GAME = 0x4,
CATEGORY_DEFAULT = 0x5,
CATEGORY_NET = 0x6,
CATEGORY_SOUND = 0x7,
CATEGORY_GM = 0x8,
NUM_CMD_CATEGORIES = 0x9
};
enum COLOR_T
{
DEFAULT_COLOR = 0x0,
INPUT_COLOR = 0x1,
ECHO_COLOR = 0x2, //GRAY
ERROR_COLOR = 0x3, // RED
WARNING_COLOR = 0x4, // YELLOW
GLOBAL_COLOR = 0x5,
ADMIN_COLOR = 0x6,
HIGHLIGHT_COLOR = 0x7,
BACKGROUND_COLOR = 0x8,
NUM_COLORTYPES = 0x9,
};
typedef BOOL(*CommadHandler)(char const* cmd, char const* args);
typedef BOOL(*ConsoleCommandRegisterPtr)(char const* command, CommadHandler handler, CommandCategory category, char const* help);
typedef void (*ConsoleCommandUnregisterPtr)(char const* command);
typedef void (*ConsoleWriteA)(const char* fmt, COLOR_T color, ...);
class Console
{
public:
static ConsoleWriteA Write;
static ConsoleCommandRegisterPtr RegisterCommand;
static ConsoleCommandUnregisterPtr UnregisterCommand;
};