Victor reimplementation of dialog box.Sorry poltuiu I can't reuse your... my system is too different :). More...
#include <DlgBox.hh>

Public Member Functions | |
| DialogBox (Game &game, enum eDlgBoxButton style, enum eDlgBoxIcon icon) | |
| void | setStyle (enum eDlgBoxButton style, enum eDlgBoxIcon icon) |
| void | setText (const std::string &msg) |
| void | setIcon (enum eDlgBoxIcon icon) |
| void | setActionHandler (DialogBoxCb *handler) |
| DialogBoxCb * | getActionHandler () const |
| 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. | |
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.
| void sdlvisu::DialogBox::addBlockButton | ( | int | dice_face | ) |
Add a block button on the dialog box.
| dice_face | The face of the dice to display in the range [1-5]. |
| int sdlvisu::DialogBox::addRerollLabel | ( | ) |
Add a reroll label.
Only for eDlgBoxBlock.
| void sdlvisu::DialogBox::disable | ( | ) | [virtual] |
| void sdlvisu::DialogBox::enable | ( | ) | [virtual] |
| void sdlvisu::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, ...
Reimplemented from VirtualSurface.
1.6.3