|
MxEngine
|
#include <GraphicConsole.h>
Public Member Functions | |
| GraphicConsole () | |
| GraphicConsole (const GraphicConsole &)=delete | |
| void | SetEventCallback (EventCallback &&callback) |
| void | PrintHistory () |
| void | ClearLog () |
| void | PrintLog (const char *fmt,...) |
| void | Draw (const char *title) |
| ImVec2 | GetSize () const |
| void | SetSize (ImVec2 size) |
Friends | |
| int | TextEditCallbackStub (ImGuiInputTextCallbackData *) |
graphic console is modified console from ImGui demo example. It features text input, search, history and logging
| MxEngine::GraphicConsole::GraphicConsole | ( | ) |
Constructs default console sized (450, 500)
| void MxEngine::GraphicConsole::ClearLog | ( | ) |
clears console
| void MxEngine::GraphicConsole::Draw | ( | const char * | title | ) |
calls ImGui code to draw console in a new personal window
| title | title of window in which console is drawn |
| ImVec2 MxEngine::GraphicConsole::GetSize | ( | ) | const |
size getter
| void MxEngine::GraphicConsole::PrintHistory | ( | ) |
prints all unique lines inputted by user to console
| void MxEngine::GraphicConsole::PrintLog | ( | const char * | fmt, |
| ... | |||
| ) |
prints message in a C-style to a console windows
| fmt | C-style formatting string |
| args | variadic argument list |
| void MxEngine::GraphicConsole::SetEventCallback | ( | EventCallback && | callback | ) |
sets event callback which activates when text line is submitted by user
| callback | functor to call on line input |
| void MxEngine::GraphicConsole::SetSize | ( | ImVec2 | size | ) |
size setter
| size | new console size in pixels |
|
friend |
called internally by console. this function is callback forwarder (acquires console object to forward event)
1.8.12