Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
blowbox::Console Class Reference

#include <console.h>

Classes

struct  Message
 

Public Member Functions

void RenderMenu () override
 
void RenderWindow () override
 
void LogStatus (const String &message)
 
void LogWarning (const String &message)
 
void LogError (const String &message)
 
void Log (const String &message, const DirectX::XMFLOAT4 &color)
 
void Clear ()
 

Protected Member Functions

void AddMessage (Message &message)
 

Private Attributes

bool new_message_added_
 
bool auto_scroll_
 
bool show_console_window_
 
RingBuffer< Messagemessage_buffer_
 

Detailed Description

Operates a console to which you can send messages.

This class operates your typical console window. It shows messages for you.

Inheritance diagram for blowbox::Console:
blowbox::DebugWindow

Member Function Documentation

void blowbox::Console::AddMessage ( Message message)
protected

Adds a Message to the console.

Parameters
[in]messageThe message to add.
void blowbox::Console::Clear ( )

Clears all messages from the console.

void blowbox::Console::Log ( const String message,
const DirectX::XMFLOAT4 &  color 
)

Logs a message in the console.

Parameters
[in]messageThe message to log.
[in]colorThe color that the message should have.
void blowbox::Console::LogError ( const String message)

Logs an error message in the console.

Parameters
[in]messageThe message to log.
void blowbox::Console::LogStatus ( const String message)

Logs a status message in the console.

Parameters
[in]messageThe message to log.
void blowbox::Console::LogWarning ( const String message)

Logs a warning message in the console.

Parameters
[in]messageThe message to log.
void blowbox::Console::RenderMenu ( )
overridevirtual

Renders the menu for the Console.

Implements blowbox::DebugWindow.

void blowbox::Console::RenderWindow ( )
overridevirtual

Renders the actual window for the Console.

Implements blowbox::DebugWindow.

Member Data Documentation

bool blowbox::Console::auto_scroll_
private

Whether the console window should auto scroll to the newest message.

RingBuffer<Message> blowbox::Console::message_buffer_
private

All messages in the console.

bool blowbox::Console::new_message_added_
private

Whether a new message has been added.

bool blowbox::Console::show_console_window_
private

Whether the console window is shown.


The documentation for this class was generated from the following files: