sdlvisu::InfoBar Class Reference
[2D Graphical User Inteface]

Game information bar (on the top). More...

#include <InfoBar.hh>

Inheritance diagram for sdlvisu::InfoBar:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 InfoBar (Game &g)
void addMessage (const std::string &s)
 Add a message at the end of the list and show it.
void addBlockDice (int dice_face)
 Add a block dice to display with current message;.
virtual void update ()
 Method called each frame, to perfom user custom code.

Detailed Description

Game information bar (on the top).


Member Function Documentation

void sdlvisu::InfoBar::update (  )  [virtual]

Method called each frame, to perfom user custom code.

You should override it.

Since a parent is assigned to the surface (and this parent is itself attached by other means to the root screen), this method is called at each frame. It is not called if this surface or one of its parent is disabled. In this method you can do what you want with your object, like processing input, updating other programs attributes, changing surface property, ...

Note:
Don't forget to call update for the base class at the end of your function , otherwise strange things will happen.

Reimplemented from VirtualSurface.

References Input::button_pressed_, Surface::getScreenRect(), and Input::mouse_.


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 21:18:05 2010 for Stechec/TBT by  doxygen 1.6.3