40 _msg(msg), _ok(ok), _cancel(cancel) {
42 load(
"okcancelpanel");
49 if (widget.
getTag() ==
"MessageLabel") {
54 if (widget.
getTag() ==
"OkButton") {
56 dynamic_cast<WidgetButton &>(widget).
setText(
_ok);
60 if (widget.
getTag() ==
"CancelButton") {
62 dynamic_cast<WidgetButton &>(widget).setText(
_cancel);
81 if (widget.
getTag() ==
"OkButton") {
86 if (widget.
getTag() ==
"CancelButton") {
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
uint32 _returnCode
The GUI's return code.
A class holding an UTF-8 string.
OKCancelDialog(const Common::UString &msg, const Common::UString &ok="", const Common::UString &cancel="", ::Engines::Console *console=0)
void initWidget(Widget &widget)
virtual void show()
Show the GUI.
WidgetLabel * getLabel(const Common::UString &tag, bool vital=false)
WidgetPanel * getPanel(const Common::UString &tag, bool vital=false)
void load(const Common::UString &resref)
bool empty() const
Is the string empty?