diff options
author | whiterandrek | 2018-06-13 08:45:30 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 60d423cabb407c9859f68e34cdc4c5056a414ccd (patch) | |
tree | 6417dbab3cf60417bcad2f477fcc48e0bb253e2e /engines/pink/objects/actors/audio_info_pda_button.cpp | |
parent | ed250751467542f0b8ef63b5e8077a48838ec9a2 (diff) | |
download | scummvm-rg350-60d423cabb407c9859f68e34cdc4c5056a414ccd.tar.gz scummvm-rg350-60d423cabb407c9859f68e34cdc4c5056a414ccd.tar.bz2 scummvm-rg350-60d423cabb407c9859f68e34cdc4c5056a414ccd.zip |
PINK: implement AudioInfoManager
Diffstat (limited to 'engines/pink/objects/actors/audio_info_pda_button.cpp')
-rw-r--r-- | engines/pink/objects/actors/audio_info_pda_button.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/engines/pink/objects/actors/audio_info_pda_button.cpp b/engines/pink/objects/actors/audio_info_pda_button.cpp new file mode 100644 index 0000000000..a5505de0f6 --- /dev/null +++ b/engines/pink/objects/actors/audio_info_pda_button.cpp @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "pink/objects/actors/audio_info_pda_button.h" +#include "pink/objects/actors/lead_actor.h" +#include "pink/objects/pages/page.h" + +namespace Pink { + +void AudioInfoPDAButton::toConsole() { + debug("AudioInfoPDAButton: _name = %s", _name.c_str()); + for (uint i = 0; i < _actions.size(); ++i) { + _actions[i]->toConsole(); + } +} + +void AudioInfoPDAButton::onMouseOver(Common::Point point, CursorMgr *mgr) { + mgr->setCursor(kClickableFirstFrameCursor, point, Common::String()); +} + +void AudioInfoPDAButton::onHover(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) { + onMouseOver(point, cursorMgr); +} + +bool AudioInfoPDAButton::onLeftClickMessage() { + AudioInfoMgr *audioInfoMgr = _page->getLeadActor()->getAudioInfoMgr(); + audioInfoMgr->onLeftClick(); + return true; +} + +} // End of namespace Pink |