|
| using | CommandFunc = std::function<void(const std::vector<std::string>&)> |
|
| void | Init () |
| | Initialize the debug console.
|
| void | Draw (bool *p_open, bool isEditorMode) |
| | Draw the debug console.
|
| void | RegisterCommand (const std::string &name, CommandFunc cmd) |
| | Register a command with the debug console.
|
| void | Execute (const std::string &commandLine) |
| | Execute a command with the given arguments.
|
| void | AddLog (LogLevel level, const char *msg) |
| | API for the callback.
|
|
| static DebugConsole & | Get () |
Definition at line 14 of file DebugConsole.hpp.
◆ CommandFunc
| using vex::DebugConsole::CommandFunc = std::function<void(const std::vector<std::string>&)> |
◆ AddLog()
| void vex::DebugConsole::AddLog |
( |
LogLevel | level, |
|
|
const char * | msg ) |
API for the callback.
- Parameters
-
| level | The log level. |
| msg | The log message. |
Definition at line 55 of file DebugConsole.cpp.
◆ Draw()
| void vex::DebugConsole::Draw |
( |
bool * | p_open, |
|
|
bool | isEditorMode ) |
Draw the debug console.
- Parameters
-
| p_open | Pointer to a boolean indicating whether the console is open. |
| isEditorMode | Indicates whether the console is in editor mode. |
Definition at line 93 of file DebugConsole.cpp.
◆ Execute()
| void vex::DebugConsole::Execute |
( |
const std::string & | commandLine | ) |
|
Execute a command with the given arguments.
- Parameters
-
| commandLine | The command line to execute. |
Definition at line 37 of file DebugConsole.cpp.
◆ Get()
| DebugConsole & vex::DebugConsole::Get |
( |
| ) |
|
|
inlinestatic |
◆ Init()
| void vex::DebugConsole::Init |
( |
| ) |
|
◆ RegisterCommand()
| void vex::DebugConsole::RegisterCommand |
( |
const std::string & | name, |
|
|
CommandFunc | cmd ) |
Register a command with the debug console.
- Parameters
-
| name | The name of the command. |
| cmd | The function to execute when the command is called. |
Definition at line 33 of file DebugConsole.cpp.
◆ m_commands
| std::map<std::string, CommandFunc> vex::DebugConsole::m_commands |
|
private |
◆ m_history
| std::vector<std::string> vex::DebugConsole::m_history |
|
private |
◆ m_historyPos
| int vex::DebugConsole::m_historyPos = -1 |
|
private |
◆ m_inputBuf
| char vex::DebugConsole::m_inputBuf[256] = {0} |
|
private |
◆ m_logs
| std::vector<LogEntry> vex::DebugConsole::m_logs |
|
private |
◆ m_mutex
| std::mutex vex::DebugConsole::m_mutex |
|
private |
◆ m_scrollToBottom
| bool vex::DebugConsole::m_scrollToBottom = true |
|
private |
The documentation for this class was generated from the following files: