[Scummvm-cvs-logs] scummvm master -> afccba26b897dd21d7fda0a03c9a91012dd73d85
dreammaster
dreammaster at scummvm.org
Thu Jul 23 03:17:53 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
afccba26b8 SHERLOCK: RT: Beginnings of Options dialog widget class
Commit: afccba26b897dd21d7fda0a03c9a91012dd73d85
https://github.com/scummvm/scummvm/commit/afccba26b897dd21d7fda0a03c9a91012dd73d85
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-22T21:16:59-04:00
Commit Message:
SHERLOCK: RT: Beginnings of Options dialog widget class
Changed paths:
A engines/sherlock/tattoo/widget_options.cpp
A engines/sherlock/tattoo/widget_options.h
engines/sherlock/module.mk
engines/sherlock/tattoo/tattoo_map.cpp
engines/sherlock/tattoo/tattoo_user_interface.cpp
engines/sherlock/tattoo/tattoo_user_interface.h
diff --git a/engines/sherlock/module.mk b/engines/sherlock/module.mk
index 4c12fc7..259c921 100644
--- a/engines/sherlock/module.mk
+++ b/engines/sherlock/module.mk
@@ -37,6 +37,7 @@ MODULE_OBJS = \
tattoo/widget_hangman.o \
tattoo/widget_inventory.o \
tattoo/widget_lab.o \
+ tattoo/widget_options.o \
tattoo/widget_talk.o \
tattoo/widget_text.o \
tattoo/widget_tooltip.o \
diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp
index 21abf7d..79eca00 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 751a462..8352e29 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 56d895d..5b3c7ea 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 0000000..5b4c706
--- /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 0000000..2edb47c
--- /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
More information about the Scummvm-git-logs
mailing list