aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_user_interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_user_interface.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 98ec34d62c..e76322833f 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -22,7 +22,7 @@
#include "sherlock/tattoo/tattoo_user_interface.h"
#include "sherlock/tattoo/tattoo_scene.h"
-#include "sherlock/sherlock.h"
+#include "sherlock/tattoo/tattoo.h"
namespace Sherlock {
@@ -31,6 +31,8 @@ namespace Tattoo {
TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm) {
_menuBuffer = nullptr;
_invMenuBuffer = nullptr;
+ _tagBuffer = nullptr;
+ _invGraphic = nullptr;
}
void TattooUserInterface::handleInput() {
@@ -38,6 +40,44 @@ void TattooUserInterface::handleInput() {
_vm->_events->pollEventsAndWait();
}
+void TattooUserInterface::drawInterface(int bufferNum) {
+ Screen &screen = *_vm->_screen;
+ TattooEngine &vm = *((TattooEngine *)_vm);
+
+ if (_invMenuBuffer != nullptr) {
+ Common::Rect r = _invMenuBounds;
+ r.grow(-3);
+ r.translate(-screen._currentScroll, 0);
+ _grayAreas.clear();
+ _grayAreas.push_back(r);
+
+ drawGrayAreas();
+ screen._backBuffer1.transBlitFrom(*_invMenuBuffer, Common::Point(_invMenuBounds.left, _invMenuBounds.top));
+ }
+
+ if (_menuBuffer != nullptr) {
+ Common::Rect r = _menuBounds;
+ r.grow(-3);
+ r.translate(-screen._currentScroll, 0);
+ _grayAreas.clear();
+ _grayAreas.push_back(r);
+
+ drawGrayAreas();
+ screen._backBuffer1.transBlitFrom(*_menuBuffer, Common::Point(_invMenuBounds.left, _invMenuBounds.top));
+ }
+
+ // See if we need to draw a Text Tag floating with the cursor
+ if (_tagBuffer != nullptr)
+ screen._backBuffer1.transBlitFrom(*_tagBuffer, Common::Point(_tagBounds.left, _tagBounds.top));
+
+ // See if we need to draw an Inventory Item Graphic floating with the cursor
+ if (_invGraphic != nullptr)
+ screen._backBuffer1.transBlitFrom(*_invGraphic, Common::Point(_invGraphicBounds.left, _invGraphicBounds.top));
+
+ if (vm._creditsActive)
+ vm.drawCredits();
+}
+
void TattooUserInterface::doBgAnimRestoreUI() {
TattooScene &scene = *((TattooScene *)_vm->_scene);
Screen &screen = *_vm->_screen;
@@ -101,6 +141,10 @@ void TattooUserInterface::doScroll() {
_invMenuBounds.translate(screen._currentScroll - oldScroll, 0);
}
+void TattooUserInterface::drawGrayAreas() {
+ // TODO
+}
+
} // End of namespace Tattoo
} // End of namespace Sherlock