diff options
author | Tobia Tesan | 2013-09-20 13:57:36 +0200 |
---|---|---|
committer | Tobia Tesan | 2013-09-21 23:22:19 +0200 |
commit | aafe8c1f0d45aef7429331b5e00f74d2e42b0ce7 (patch) | |
tree | ce6ea6259ce77599b6fd46874006d17c2853e320 /engines/wintermute | |
parent | 2e457d96e8095020bce006fd633382bde6c6ae26 (diff) | |
download | scummvm-rg350-aafe8c1f0d45aef7429331b5e00f74d2e42b0ce7.tar.gz scummvm-rg350-aafe8c1f0d45aef7429331b5e00f74d2e42b0ce7.tar.bz2 scummvm-rg350-aafe8c1f0d45aef7429331b5e00f74d2e42b0ce7.zip |
WINTERMUTE: Add getListener()
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/ad/ad_inventory_box.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_response_box.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_object.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_object.h | 8 |
4 files changed, 11 insertions, 5 deletions
diff --git a/engines/wintermute/ad/ad_inventory_box.cpp b/engines/wintermute/ad/ad_inventory_box.cpp index 681d7311b7..313da99a28 100644 --- a/engines/wintermute/ad/ad_inventory_box.cpp +++ b/engines/wintermute/ad/ad_inventory_box.cpp @@ -323,7 +323,7 @@ bool AdInventoryBox::loadBuffer(byte *buffer, bool complete) { if (_window) { for (uint32 i = 0; i < _window->_widgets.size(); i++) { - if (!_window->_widgets[i]->_listenerObject) { + if (!_window->_widgets[i]->getListener()) { _window->_widgets[i]->setListener(this, _window->_widgets[i], 0); } } diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp index 24eaa77023..6d513eb851 100644 --- a/engines/wintermute/ad/ad_response_box.cpp +++ b/engines/wintermute/ad/ad_response_box.cpp @@ -374,7 +374,7 @@ bool AdResponseBox::loadBuffer(byte *buffer, bool complete) { if (_window) { for (uint32 i = 0; i < _window->_widgets.size(); i++) { - if (!_window->_widgets[i]->_listenerObject) { + if (!_window->_widgets[i]->getListener()) { _window->_widgets[i]->setListener(this, _window->_widgets[i], 0); } } diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp index 333bba80c4..e4bcb2aa6b 100644 --- a/engines/wintermute/ui/ui_object.cpp +++ b/engines/wintermute/ui/ui_object.cpp @@ -720,5 +720,9 @@ BaseFont *UIObject::getFont() { return _font; } +BaseScriptHolder *UIObject::getListener() { + return _listenerObject; +} + } // End of namespace Wintermute diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h index bcd90082d1..6d1f6ae895 100644 --- a/engines/wintermute/ui/ui_object.h +++ b/engines/wintermute/ui/ui_object.h @@ -57,9 +57,8 @@ public: UIObject(BaseGame *inGame = nullptr); virtual ~UIObject(); void setListener(BaseScriptHolder *object, BaseScriptHolder *listenerObject, uint32 listenerParam); - BaseScriptHolder *_listenerParamObject; - uint32 _listenerParamDWORD; - BaseScriptHolder *_listenerObject; + BaseScriptHolder *getListener(); + UIObject *_focusedWidget; virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override; @@ -89,6 +88,9 @@ public: bool canFocus(); protected: + BaseScriptHolder *_listenerParamObject; + uint32 _listenerParamDWORD; + BaseScriptHolder *_listenerObject; BaseSprite *_image; BaseFont *_font; bool _sharedFonts; |