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

Victor reimplementation of dialog box.

Sorry poltuiu I can't reuse your... my system is too different :). More...

#include <DlgBox.hh>

Inheritance diagram for sdlvisu::DialogBox:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DialogBox (Game &game)
 DialogBox (Game &game, enum eDlgBoxButton style, enum eDlgBoxIcon icon)
void setStyle (enum eDlgBoxButton style, enum eDlgBoxIcon icon)
void setText (const std::string &msg)
void setActionHandler (DialogBoxCb *handler)
DialogBoxCbgetActionHandler ()
void addBlockButton (int dice_face)
 Add a block button on the dialog box.
int addRerollLabel ()
 Add a reroll label.
virtual void enable ()
 Enable this widget.
virtual void disable ()
 Disable this widget.
virtual void update ()
 Method called each frame, to perfom user custom code.

Detailed Description

Victor reimplementation of dialog box.

Sorry poltuiu I can't reuse your... my system is too different :).

DialogBox handles itself on the renderer list, so you don't need to use addChild on it. It adds itself to the screen list on creation, and remove itself on deletion.


Member Function Documentation

void DialogBox::addBlockButton ( int  dice_face  ) 

Add a block button on the dialog box.

Parameters:
dice_face The face of the dice to display in the range [1-5].
Note:
Only work with eDlgBoxBlock.

int DialogBox::addRerollLabel (  ) 

Add a reroll label.

Only for eDlgBoxBlock.

Returns:
Index of reroll boutton.

void DialogBox::disable (  )  [virtual]

Disable this widget.

Note:
Function update() and render() will not be called for this widget.

Reimplemented from Surface.

void DialogBox::enable (  )  [virtual]

Enable this widget.

Note:
This is the default.

Reimplemented from VirtualSurface.

void DialogBox::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.


The documentation for this class was generated from the following files:
Generated on Sat Jun 23 16:15:44 2007 for Stechec/TBT by  doxygen 1.4.7