Sorry poltuiu I can't reuse your... my system is too different :). More...
#include <DlgBox.hh>
Inheritance diagram for sdlvisu::DialogBox:

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) |
| DialogBoxCb * | getActionHandler () |
| 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. | |
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 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 DialogBox::addRerollLabel | ( | ) |
Add a reroll label.
Only for eDlgBoxBlock.
| void DialogBox::disable | ( | ) | [virtual] |
| void DialogBox::enable | ( | ) | [virtual] |
| 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, ...
Reimplemented from VirtualSurface.
1.4.7