forked from MishaKonsta/jni-samp-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsolegui.h
34 lines (27 loc) · 911 Bytes
/
consolegui.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
#pragma once
#include <vector>
#include <vendor/imgui/imgui.h>
#define MAX_CONSOLE_INPUT_BUFFER 256
class CConsoleGUI
{
private:
char m_szBuffer[MAX_CONSOLE_INPUT_BUFFER];
ImVector<char*> m_vecItems;
ImVector<const char*> m_vecCommands;
ImVector<char*> m_vecHistory;
int m_iHistoryPos;
ImGuiTextFilter m_TextFilter;
bool m_bAutoScroll;
bool m_bScrollToBottom;
bool m_bDraw;
public:
CConsoleGUI();
~CConsoleGUI();
void ClearLog();
void AddLog(const char *fmt, ...) IM_FMTARGS(2);
void Draw();
void ToggleDraw();
void RegisterCommands();
void ProcessCommand(const char *cmd);
int TextEditCallback(ImGuiTextEditCallbackData *data);
};