diff options
author | Paul Gilbert | 2015-08-08 12:41:46 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-08-08 12:41:46 -0400 |
commit | 41e1320d83b4333cbf4353790f1a0c05bd6deecc (patch) | |
tree | 265f48b06ee9d4be20dccfd0445587d801673031 /engines/sherlock/tattoo | |
parent | b29413965cc765325f2913242ce777088bb2f9e9 (diff) | |
download | scummvm-rg350-41e1320d83b4333cbf4353790f1a0c05bd6deecc.tar.gz scummvm-rg350-41e1320d83b4333cbf4353790f1a0c05bd6deecc.tar.bz2 scummvm-rg350-41e1320d83b4333cbf4353790f1a0c05bd6deecc.zip |
SHERLOCK: RT: Fix display of scrollbar up/arrow arrows
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/widget_base.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp index 0683245355..7a341ccaae 100644 --- a/engines/sherlock/tattoo/widget_base.cpp +++ b/engines/sherlock/tattoo/widget_base.cpp @@ -236,6 +236,7 @@ Common::Rect WidgetBase::getScrollBarBounds() const { void WidgetBase::drawScrollBar(int index, int pageSize, int count) { TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; + ImageFile &imgaes = *ui._interfaceImages; // Fill the area with transparency Common::Rect r = getScrollBarBounds(); @@ -251,23 +252,16 @@ void WidgetBase::drawScrollBar(int index, int pageSize, int count) { // Draw the arrows on the scroll buttons byte color = index ? INFO_BOTTOM + 2 : INFO_BOTTOM; - _surface.hLine(r.right / 2, r.top - 2 + BUTTON_SIZE / 2, r.right / 2, color); - _surface.fillRect(Common::Rect(r.right / 2 - 1, r.top - 1 + BUTTON_SIZE / 2, - r.right / 2 + 1, r.top - 1 + BUTTON_SIZE / 2), color); - _surface.fillRect(Common::Rect(r.right / 2 - 2, r.top + BUTTON_SIZE / 2, - r.right / 2 + 2, r.top + BUTTON_SIZE / 2), color); - _surface.fillRect(Common::Rect(r.right / 2 - 3, r.top + 1 + BUTTON_SIZE / 2, - r.right / 2 + 3, r.top + 1 + BUTTON_SIZE / 2), color); + _surface.hLine(r.left + r.width() / 2, r.top - 2 + BUTTON_SIZE / 2, r.left + r.width() / 2, color); + _surface.hLine(r.left + r.width() / 2 - 1, r.top - 1 + BUTTON_SIZE / 2, r.left + r.width() / 2 + 1, color); + _surface.hLine(r.left + r.width() / 2 - 2, r.top + BUTTON_SIZE / 2, r.left + r.width() / 2 + 2, color); + _surface.hLine(r.left + r.width() / 2 - 3, r.top + 1 + BUTTON_SIZE / 2, r.left + r.width() / 2 + 3, color); color = (index + pageSize) < count ? INFO_BOTTOM + 2 : INFO_BOTTOM; - _surface.fillRect(Common::Rect(r.right / 2 - 3, r.bottom - 1 - BUTTON_SIZE + BUTTON_SIZE / 2, - r.right / 2 + 3, r.bottom - 1 - BUTTON_SIZE + BUTTON_SIZE / 2), color); - _surface.fillRect(Common::Rect(r.right / 2 - 2, r.bottom - 1 - BUTTON_SIZE + 1 + BUTTON_SIZE / 2, - r.right / 2 + 2, r.bottom - 1 - BUTTON_SIZE + 1 + BUTTON_SIZE / 2), color); - _surface.fillRect(Common::Rect(r.right / 2 - 1, r.bottom - 1 - BUTTON_SIZE + 2 + BUTTON_SIZE / 2, - r.right / 2 + 1, r.bottom - 1 - BUTTON_SIZE + 2 + BUTTON_SIZE / 2), color); - _surface.fillRect(Common::Rect(r.right / 2, r.bottom - 1 - BUTTON_SIZE + 3 + BUTTON_SIZE / 2, - r.right / 2, r.bottom - 1 - BUTTON_SIZE + 3 + BUTTON_SIZE / 2), color); + _surface.hLine(r.left + r.width() / 2 - 3, r.bottom - 1 - BUTTON_SIZE + BUTTON_SIZE / 2, r.left + r.width() / 2 + 3, color); + _surface.hLine(r.left + r.width() / 2 - 2, r.bottom - 1 - BUTTON_SIZE + 1 + BUTTON_SIZE / 2, r.left + r.width() / 2 + 2, color); + _surface.hLine(r.left + r.width() / 2 - 1, r.bottom - 1 - BUTTON_SIZE + 2 + BUTTON_SIZE / 2, r.left + r.width() / 2 + 1, color); + _surface.hLine(r.left + r.width() / 2, r.bottom - 1 - BUTTON_SIZE + 3 + BUTTON_SIZE / 2, r.left + r.width() / 2, color); // Draw the scroll position bar int barHeight = (r.height() - BUTTON_SIZE * 2) * pageSize / count; |