#include <LayoutConsole.h>
Public Member Functions | |
bool | Load () |
protected Load, should be called automatically when an unloaded layout is shown | |
bool | Show () |
show the layout, actually adds the current layout as a child of the root window | |
bool | Hide () |
removes the layout from the active layouts (so more seen and no more receiving input) | |
void | Iterate (float seconds) |
override this if you want to control the layout over time iterations | |
void | ScrollHistory (int lineCount) |
void | SetCommandToHistory (bool direction) |
void | AddLineToHistory (const char *data) |
bool | Toggle () |
turns the console on/off, using the current display state. | |
Static Public Member Functions | |
static CLayoutConsole * | GetInstance () |
sub classes should implement this for easy access to self (which is a singleton) | |
Private Member Functions | |
bool | handle_enterCommand (const CEGUI::EventArgs &e) |
handle_enterCommand | |
bool | Unload () |
unloads all the gui-related (cegui) data associated with the layout. | |
Private Attributes | |
float | slideSpeed |
openng/closing sequence speed | |
bool | opening |
set to true if console is in opening sequence | |
bool | closing |
set to true if console is in closing sequence | |
unsigned int | currentLine |
0 means we are writing a new line, other values indicate a line copied from history. | |
CEGUI::String | historyText |
all the history text is kept here |
void CLayoutConsole::ScrollHistory | ( | int | lineCount | ) |
scrolls the multiline box
lineCount | Sets how many lines are scrolled. Can be postive or negative. |
void CLayoutConsole::SetCommandToHistory | ( | bool | direction | ) |
updates current command with a history command
direction | true means go backwards in history, falses means forward. |
void CLayoutConsole::AddLineToHistory | ( | const char * | data | ) |
adds the given string to the command history, exposed to scripting interface, line is preceded with ** characters to be able to differentiate it from other inputs to history.