[Scummvm-cvs-logs] scummvm master -> 41e1320d83b4333cbf4353790f1a0c05bd6deecc
dreammaster
dreammaster at scummvm.org
Sat Aug 8 18:42:39 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:
41e1320d83 SHERLOCK: RT: Fix display of scrollbar up/arrow arrows
Commit: 41e1320d83b4333cbf4353790f1a0c05bd6deecc
https://github.com/scummvm/scummvm/commit/41e1320d83b4333cbf4353790f1a0c05bd6deecc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-08-08T12:41:46-04:00
Commit Message:
SHERLOCK: RT: Fix display of scrollbar up/arrow arrows
Changed paths:
engines/sherlock/tattoo/widget_base.cpp
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp
index 0683245..7a341cc 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;
More information about the Scummvm-git-logs
mailing list