tec::Console
#include <console.hpp>
Inherits from tec::AbstractWindow, tec::EventQueue< KeyboardEvent >, tec::EventQueue< WindowResizedEvent >
Public Functions
Name | |
---|---|
Console() | |
virtual void | Update(double delta) override |
void | Clear() |
void | Println(const std::string & str, ImVec4 color =ImVec4(255, 255, 255, 255)) |
void | Println(const char * cstr, ImVec4 color =ImVec4(255, 255, 255, 255)) |
void | Printfln(const char * cstr, ... ) |
virtual void | Draw(IMGUISystem * ) override |
virtual bool | isCollapsed() const override |
void | AddConsoleCommand(std::string name, std::string help, std::function< void(const std::string &)> && func) |
void | AddSlashHandler(std::function< void(const std::string &)> && func) |
Additional inherited members
Public Functions inherited from tec::AbstractWindow
Name | |
---|---|
virtual | ~AbstractWindow() =default |
void | SetAlpha(float a) |
float | GetAlpha() const |
bool | isVisible() const |
void | Hide() |
void | Show() |
std::string | GetWindowName() |
Protected Attributes inherited from tec::AbstractWindow
Name | |
---|---|
float | alpha |
bool | collapsed |
bool | show Collapsed ? |
std::string | window_name Visible ? |
Public Functions inherited from tec::EventQueue< KeyboardEvent >
Name | |
---|---|
EventQueue() | |
EventQueue(eid entity_id) | |
virtual | ~EventQueue() |
void | ProcessEventQueue() |
void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< KeyboardEvent >
Name | |
---|---|
Queue< Event< T > > * | read_event_queue |
std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions inherited from tec::EventQueue< WindowResizedEvent >
Name | |
---|---|
EventQueue() | |
EventQueue(eid entity_id) | |
virtual | ~EventQueue() |
void | ProcessEventQueue() |
void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< WindowResizedEvent >
Name | |
---|---|
Queue< Event< T > > * | read_event_queue |
std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions Documentation
function Console
Console()
function Update
virtual void Update(
double delta
) override
Reimplements: tec::AbstractWindow::Update
function Clear
void Clear()
Clears console output
function Println
void Println(
const std::string & str,
ImVec4 color =ImVec4(255, 255, 255, 255)
)
function Println
void Println(
const char * cstr,
ImVec4 color =ImVec4(255, 255, 255, 255)
)
function Printfln
void Printfln(
const char * cstr,
...
)
function Draw
virtual void Draw(
IMGUISystem *
) override
Reimplements: tec::AbstractWindow::Draw
function isCollapsed
inline virtual bool isCollapsed() const override
Reimplements: tec::AbstractWindow::isCollapsed
function AddConsoleCommand
void AddConsoleCommand(
std::string name,
std::string help,
std::function< void(const std::string &)> && func
)
Parameters:
- name Name of the command (case sensitive!)
- help String with help text
- func Function to be executed when the command is called
Register a new command
function AddSlashHandler
void AddSlashHandler(
std::function< void(const std::string &)> && func
)
Parameters:
- func Function to be executed when the command is called
Register a slash handler that handles all '/' commands
Updated on 2022-07-24 at 19:27:35 +0000