diff options
author | Paul Gilbert | 2015-07-22 21:16:59 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-22 21:16:59 -0400 |
commit | afccba26b897dd21d7fda0a03c9a91012dd73d85 (patch) | |
tree | 142334999e87c151e5a3771a3528c197e9e80bc5 /engines/sherlock/tattoo | |
parent | 5117482f7960018d184938447a3a10991472f4dc (diff) | |
download | scummvm-rg350-afccba26b897dd21d7fda0a03c9a91012dd73d85.tar.gz scummvm-rg350-afccba26b897dd21d7fda0a03c9a91012dd73d85.tar.bz2 scummvm-rg350-afccba26b897dd21d7fda0a03c9a91012dd73d85.zip |
SHERLOCK: RT: Beginnings of Options dialog widget class
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_map.cpp | 1 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 7 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.h | 2 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_options.cpp | 43 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_options.h | 59 |
5 files changed, 107 insertions, 5 deletions
diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp index 21abf7d3c0..79eca00e91 100644 --- a/engines/sherlock/tattoo/tattoo_map.cpp +++ b/engines/sherlock/tattoo/tattoo_map.cpp @@ -422,7 +422,6 @@ void TattooMap::showCloseUp(int closeUpNum) { } // Handle final drawing of closeup - // TODO: Handle scrolling Common::Rect r(SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2, SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2, SHERLOCK_SCREEN_WIDTH / 2 - pic[0]._width / 2 + pic[0]._width, SHERLOCK_SCREEN_HEIGHT / 2 - pic[0]._height / 2 + pic[0]._height); diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index 751a462088..8352e2975c 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -31,7 +31,7 @@ namespace Tattoo { TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm), _inventoryWidget(vm), _messageWidget(vm), _textWidget(vm), _tooltipWidget(vm), _verbsWidget(vm), - _labWidget(vm), _creditsWidget(vm) { + _labWidget(vm), _creditsWidget(vm), _optionsWidget(vm) { Common::fill(&_lookupTable[0], &_lookupTable[PALETTE_COUNT], 0); Common::fill(&_lookupTable1[0], &_lookupTable1[PALETTE_COUNT], 0); _scrollSize = 0; @@ -406,8 +406,7 @@ void TattooUserInterface::doStandardControl() { case Common::KEYCODE_F4: // Display options - freeMenu(); - doControls(); + _optionsWidget.summonWindow(); return; case Common::KEYCODE_F10: @@ -562,7 +561,7 @@ void TattooUserInterface::doInventory(int mode) { } void TattooUserInterface::doControls() { - // TODO + _optionsWidget.load(); } void TattooUserInterface::pickUpObject(int objNum) { diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h index 56d895dbfd..5b3c7ea401 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.h +++ b/engines/sherlock/tattoo/tattoo_user_interface.h @@ -31,6 +31,7 @@ #include "sherlock/tattoo/widget_credits.h" #include "sherlock/tattoo/widget_inventory.h" #include "sherlock/tattoo/widget_lab.h" +#include "sherlock/tattoo/widget_options.h" #include "sherlock/tattoo/widget_text.h" #include "sherlock/tattoo/widget_tooltip.h" #include "sherlock/tattoo/widget_verbs.h" @@ -109,6 +110,7 @@ public: ImageFile *_interfaceImages; WidgetCredits _creditsWidget; WidgetLab _labWidget; + WidgetOptions _optionsWidget; WidgetText _textWidget; WidgetSceneTooltip _tooltipWidget; WidgetVerbs _verbsWidget; diff --git a/engines/sherlock/tattoo/widget_options.cpp b/engines/sherlock/tattoo/widget_options.cpp new file mode 100644 index 0000000000..5b4c706a5c --- /dev/null +++ b/engines/sherlock/tattoo/widget_options.cpp @@ -0,0 +1,43 @@ +/* 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 "sherlock/tattoo/widget_options.h" +#include "sherlock/tattoo/tattoo.h" + +namespace Sherlock { + +namespace Tattoo { + +WidgetOptions::WidgetOptions(SherlockEngine *vm) : WidgetBase(vm) { +} + +void WidgetOptions::load() { + +} + +void WidgetOptions::handleEvents() { + Events &events = *_vm->_events; +} + +} // End of namespace Tattoo + +} // End of namespace Sherlock diff --git a/engines/sherlock/tattoo/widget_options.h b/engines/sherlock/tattoo/widget_options.h new file mode 100644 index 0000000000..2edb47cb79 --- /dev/null +++ b/engines/sherlock/tattoo/widget_options.h @@ -0,0 +1,59 @@ +/* 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. + * + */ + +#ifndef SHERLOCK_TATTOO_WIDGET_OPTIONS_H +#define SHERLOCK_TATTOO_WIDGET_OPTIONS_H + +#include "common/scummsys.h" +#include "sherlock/tattoo/widget_base.h" + +namespace Sherlock { + +class SherlockEngine; + +namespace Tattoo { + +/** + * Handles displaying the options dialog + */ +class WidgetOptions : public WidgetBase { +private: +public: + WidgetOptions(SherlockEngine *vm); + virtual ~WidgetOptions() {} + + /** + * Load and then display the options dialog + */ + void load(); + + /** + * Handle event processing + */ + virtual void handleEvents(); +}; + +} // End of namespace Tattoo + +} // End of namespace Sherlock + +#endif |