aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-29 21:53:40 -0400
committerPaul Gilbert2015-06-29 21:53:40 -0400
commit93072407bc1f0389a4e5195f96715e4b5acdcc65 (patch)
treedcbce88473b9870c19710aa760b7a244cb855b4a
parent03adfa2b968b519a560e762df4a5e23e0f302873 (diff)
downloadscummvm-rg350-93072407bc1f0389a4e5195f96715e4b5acdcc65.tar.gz
scummvm-rg350-93072407bc1f0389a4e5195f96715e4b5acdcc65.tar.bz2
scummvm-rg350-93072407bc1f0389a4e5195f96715e4b5acdcc65.zip
SHERLOCK: RT: Fix display of lines in inventory dialog
-rw-r--r--engines/sherlock/tattoo/widget_inventory.cpp29
-rw-r--r--engines/sherlock/tattoo/widget_inventory.h5
2 files changed, 33 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp
index 84a26049e2..ed7ca8fc61 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -67,7 +67,7 @@ void WidgetInventoryTooltip::setText(const Common::String &str) {
} else {
line1 = Common::String(str.c_str(), space);
line2 = Common::String(space + 1);
- int height = _surface.stringHeight(line1) + _surface.stringHeight(line2) + 4;
+ height = _surface.stringHeight(line1) + _surface.stringHeight(line2) + 4;
}
break;
} else {
@@ -292,9 +292,36 @@ void WidgetInventory::load(int mode) {
// Draw the window background and then the inventory on top of it
makeInfoArea(_surface);
+ drawBars();
drawInventory();
}
+void WidgetInventory::drawBars() {
+ TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
+ ImageFile &images = *ui._interfaceImages;
+ int x;
+
+ _surface.hLine(3, INVENTORY_YSIZE + 3, _bounds.width() - 4, INFO_TOP);
+ _surface.hLine(3, INVENTORY_YSIZE + 4, _bounds.width() - 4, INFO_MIDDLE);
+ _surface.hLine(3, INVENTORY_YSIZE + 5, _bounds.width() - 4, INFO_BOTTOM);
+ _surface.transBlitFrom(images[4], Common::Point(0, INVENTORY_YSIZE + 2));
+
+ for (int idx = 1; idx <= NUM_INVENTORY_SHOWN / 2; ++idx) {
+ x = idx * (INVENTORY_XSIZE + 3);
+
+ _surface.vLine(x, 3, _bounds.height() - 4, INFO_TOP);
+ _surface.vLine(x + 1, 3, _bounds.height() - 4, INFO_MIDDLE);
+ _surface.vLine(x + 2, 3, _bounds.height() - 4, INFO_BOTTOM);
+
+ _surface.transBlitFrom(images[6], Common::Point(x - 1, 1));
+ _surface.transBlitFrom(images[7], Common::Point(x - 1, _bounds.height() - 4));
+ _surface.transBlitFrom(images[6], Common::Point(x - 1, INVENTORY_YSIZE + 5));
+ _surface.transBlitFrom(images[7], Common::Point(x - 1, INVENTORY_YSIZE + 2));
+ }
+
+ _surface.hLine(x + 2, INVENTORY_YSIZE + 2, INVENTORY_YSIZE + 8, INFO_BOTTOM);
+}
+
void WidgetInventory::drawInventory() {
Inventory &inv = *_vm->_inventory;
diff --git a/engines/sherlock/tattoo/widget_inventory.h b/engines/sherlock/tattoo/widget_inventory.h
index ac0a8d4e38..99086ad801 100644
--- a/engines/sherlock/tattoo/widget_inventory.h
+++ b/engines/sherlock/tattoo/widget_inventory.h
@@ -82,6 +82,11 @@ private:
Surface _menuSurface;
/**
+ * Draw the bars within the dialog
+ */
+ void drawBars();
+
+ /**
* Draw the scrollbar for the dialog
*/
void drawScrollBar();