Keos::Console::CLookDefault Class Reference

Class defining a personalized look for the console. More...

#include <KeosConsoleLookDefault.h>

Inheritance diagram for Keos::Console::CLookDefault:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CLookDefault (const String &strFont, TVector2F Size, const String &strTexture, const CColor &TextColor=CColor::White, const CColor &TextOkColor=CColor(150, 200, 150), const CColor &TextErrorColor=CColor(200, 150, 150))
 Default constructor.
virtual void Update ()
 Function called during the update of the console.
virtual void Draw () const
 Function called during the display of the console.
virtual void Show (bool bVisible)
 Function called during the activation/deactivation of the console.
virtual void CommandCalled (const String &strResult)
 Function called after the call to a command.
virtual void TextChanged (const String &strNewText)
 Function called to every change of the current line.
virtual void Error (const String &strMessage)
 Function called in case of error.
void SetTextColors (const CColor &TextColor, const CColor &TextOkColor, const CColor &TextErrorColor)
 Change the colors of the text in console.

Detailed Description

Class defining a personalized look for the console.

Todo:
Add a constructor with a backgroud color instead of texture.

Definition at line 40 of file KeosConsoleLookDefault.h.


Constructor & Destructor Documentation

Keos::Console::CLookDefault::CLookDefault ( const String strFont,
TVector2F  Size,
const String strTexture,
const CColor TextColor = CColor::White,
const CColor TextOkColor = CColor(150, 200, 150),
const CColor TextErrorColor = CColor(200, 150, 150) 
)

Default constructor.

Parameters:
strFont Resource name for the font.
Size Size of the console.
strTexture File with the texture for the background.
TextColor Color of the text seized by the user.
TextOkColor Color of the text returned by a command.
TextErrorColor Color of the text resulting from an error.

Definition at line 41 of file KeosConsoleLookDefault.cpp.

References Keos::Console::Bind(), Keos::CSingleton< T >::Instance(), Renderer, Keos::CMatrix4::SetScaling(), Keos::CVector2< T >::x, and Keos::CVector2< T >::y.


Member Function Documentation

void Keos::Console::CLookDefault::Update (  )  [virtual]

Function called during the update of the console.

Function to be overloaded to define an ILook.

Implements Keos::Console::ILook.

Definition at line 81 of file KeosConsoleLookDefault.cpp.

References Keos::CSingleton< T >::Instance(), and Keos::CMatrix4::SetScaling().

void Keos::Console::CLookDefault::Draw (  )  const [virtual]

Function called during the display of the console.

Function to be overloaded to define an ILook.

Implements Keos::Console::ILook.

Definition at line 117 of file KeosConsoleLookDefault.cpp.

References Keos::BLEND_INVSRCALPHA, Keos::BLEND_SRCALPHA, Keos::MAT_MODELVIEW, Keos::RENDER_ALPHABLEND, Keos::RENDER_ZWRITE, and Renderer.

void Keos::Console::CLookDefault::Show ( bool  bVisible  )  [virtual]

Function called during the activation/deactivation of the console.

Function to be overloaded to define an ILook.

Parameters:
bVisible Show/Hide the console (state).

Implements Keos::Console::ILook.

Definition at line 142 of file KeosConsoleLookDefault.cpp.

void Keos::Console::CLookDefault::CommandCalled ( const String strResult  )  [virtual]

Function called after the call to a command.

Function to be overloaded to define an ILook.

Parameters:
strResult Result of the call of the command.

Implements Keos::Console::ILook.

Definition at line 148 of file KeosConsoleLookDefault.cpp.

void Keos::Console::CLookDefault::TextChanged ( const String strNewText  )  [virtual]

Function called to every change of the current line.

Function to be overloaded to define an ILook.

Parameters:
strNewText New text.

Implements Keos::Console::ILook.

Definition at line 156 of file KeosConsoleLookDefault.cpp.

void Keos::Console::CLookDefault::Error ( const String strMessage  )  [virtual]

Function called in case of error.

Function to be overloaded to define an ILook.

Parameters:
strMessage Message describing the error.

Implements Keos::Console::ILook.

Definition at line 162 of file KeosConsoleLookDefault.cpp.

void Keos::Console::CLookDefault::SetTextColors ( const CColor TextColor,
const CColor TextOkColor,
const CColor TextErrorColor 
) [inline]

Change the colors of the text in console.

Parameters:
TextColor Color of the text seized by the user.
TextOkColor Color of the text returned by a command.
TextErrorColor Color of the text resulting from an error.

Definition at line 95 of file KeosConsoleLookDefault.h.


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:34 2007 for Keos by  doxygen 1.5.1-p1