This class handle all the suff of the console. More...
#include <console.h>
Public Member Functions | |
console () | |
Constructor. | |
~console () | |
Destructor. | |
int | init (coeur *, IGUIEnvironment *) |
Init the console. | |
int | update () |
Updating (must be call on each loop). | |
int | close () |
Close the console. | |
bool | OnEvent (const SEvent &) |
Call when an event occured. | |
void | write (std::string const &) |
Write some text on the console. | |
void | position () |
Display the position of the camera. | |
void | rotation () |
Display the rotation of the camera. | |
void | target () |
Display the position of the target of the camera. | |
void | exit () |
void | quit () |
Quit the game. | |
void | help () |
Display an helping text. | |
void | fps () |
Display the actual fps. | |
Private Attributes | |
IrrlichtDevice * | device |
The Irrlicht Device. | |
IGUIEnvironment * | env |
The Irrlicht Envirronement. | |
stringw * | text |
Contain the text display by the console. | |
IGUIImage * | cons |
Just use to contain all the item of the console. | |
IGUIEditBox * | tx |
Box where are displayed the text of the console. | |
IGUIEditBox * | box |
Box where you type the command to launch to the console. | |
IGUIStaticText * | FPS |
Box who displayed the fps. | |
std::vector< stringw > * | history |
Contain the history of the command enter. | |
unsigned int | histPos |
Contain the position in the history. |
This class handle all the suff of the console.
Definition at line 27 of file console.h.
console::console | ( | ) |
Constructor.
/todo Hide the fps when hide the console(or not)
Definition at line 9 of file console.cpp.
console::~console | ( | ) |
Destructor.
Definition at line 17 of file console.cpp.
int console::close | ( | ) | [virtual] |
Close the console.
Reimplemented from base.
Definition at line 84 of file console.cpp.
References pyInt::exec(), base::mycore, and coeur::py.
Referenced by coeur::close().
void console::exit | ( | ) |
Close the console /todo Change the name of this function because it exit as much as it lake visible
Definition at line 155 of file console.cpp.
References cons, and base::log().
Referenced by BOOST_PYTHON_MODULE(), and OnEvent().
void console::fps | ( | ) |
Display the actual fps.
Definition at line 194 of file console.cpp.
References env, base::log(), and write().
Referenced by BOOST_PYTHON_MODULE().
void console::help | ( | ) |
Display an helping text.
Definition at line 176 of file console.cpp.
References coeur::getVersion(), base::log(), base::mycore, and write().
Referenced by BOOST_PYTHON_MODULE().
int console::init | ( | coeur * | c, | |
IGUIEnvironment * | e | |||
) |
Init the console.
Definition at line 22 of file console.cpp.
References pyInt::addPyEnv(), box, cons, coeur::currentChap, coeur::currentLocal, env, pyInt::exec(), FPS, coeur::in, base::log(), base::mycore, coeur::mycredit, coeur::py, and tx.
Referenced by coeur::init().
bool console::OnEvent | ( | const SEvent & | event | ) |
Call when an event occured.
Definition at line 92 of file console.cpp.
References box, cons, pyInt::eval(), exit(), history, histPos, base::log(), base::mycore, coeur::py, and write().
Referenced by coeur::OnEvent().
void console::position | ( | ) |
Display the position of the camera.
Definition at line 137 of file console.cpp.
References coeur::cam, base::log(), base::mycore, and write().
Referenced by BOOST_PYTHON_MODULE().
void console::quit | ( | ) |
Quit the game.
Definition at line 169 of file console.cpp.
References base::log(), base::mycore, coeur::q, and write().
Referenced by BOOST_PYTHON_MODULE().
void console::rotation | ( | ) |
Display the rotation of the camera.
Definition at line 143 of file console.cpp.
References coeur::cam, base::log(), base::mycore, and write().
Referenced by BOOST_PYTHON_MODULE().
void console::target | ( | ) |
Display the position of the target of the camera.
Definition at line 149 of file console.cpp.
References coeur::cam, base::log(), base::mycore, and write().
Referenced by BOOST_PYTHON_MODULE().
int console::update | ( | ) | [virtual] |
Updating (must be call on each loop).
Reimplemented from base.
Definition at line 72 of file console.cpp.
References box, cons, env, and FPS.
Referenced by coeur::update().
void console::write | ( | std::string const & | message | ) |
Write some text on the console.
This method log a text to the console, used by python to replace stdout
message | Text to log |
Definition at line 130 of file console.cpp.
Referenced by BOOST_PYTHON_MODULE(), fps(), help(), OnEvent(), position(), quit(), rotation(), and target().
IGUIEditBox* console::box [private] |
IGUIImage* console::cons [private] |
IrrlichtDevice* console::device [private] |
IGUIEnvironment* console::env [private] |
IGUIStaticText* console::FPS [private] |
std::vector<stringw>* console::history [private] |
unsigned int console::histPos [private] |
stringw* console::text [private] |
IGUIEditBox* console::tx [private] |