aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/ui
diff options
context:
space:
mode:
authorThanasis Antoniou2019-05-06 21:24:51 +0300
committerThanasis Antoniou2019-05-06 23:53:43 +0300
commit4cbe0a6fe650045351eeb2f2e62310e0ee6e52cb (patch)
tree1f41591d346d1383d0bd4ef5e14afd34a28dbdb6 /engines/bladerunner/ui
parentd30c5e241959ae3d97a0280fe31ee1ff6f8b930f (diff)
downloadscummvm-rg350-4cbe0a6fe650045351eeb2f2e62310e0ee6e52cb.tar.gz
scummvm-rg350-4cbe0a6fe650045351eeb2f2e62310e0ee6e52cb.tar.bz2
scummvm-rg350-4cbe0a6fe650045351eeb2f2e62310e0ee6e52cb.zip
BLADERUNNER: Fix disabled mouse hover image blinking issues
Diffstat (limited to 'engines/bladerunner/ui')
-rw-r--r--engines/bladerunner/ui/ui_image_picker.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/engines/bladerunner/ui/ui_image_picker.cpp b/engines/bladerunner/ui/ui_image_picker.cpp
index 2a6d870512..dfc897eafa 100644
--- a/engines/bladerunner/ui/ui_image_picker.cpp
+++ b/engines/bladerunner/ui/ui_image_picker.cpp
@@ -197,19 +197,16 @@ void UIImagePicker::draw(Graphics::Surface &surface) {
continue;
}
- if (i == _hoveredImageIndex && i == _pressedImageIndex && _isButtonDown) {
- if (!_vm->_mouse->isDisabled()) {
- if (img.shapeDown) {
- img.shapeDown->draw(surface, img.rect.left, img.rect.top);
- }
- }
- } else if (i == _hoveredImageIndex && !_isButtonDown) {
- if (!_vm->_mouse->isDisabled()) {
- if (img.shapeHovered) {
- img.shapeHovered->draw(surface, img.rect.left, img.rect.top);
- }
- }
+ if (i == _hoveredImageIndex && i == _pressedImageIndex && _isButtonDown
+ && !_vm->_mouse->isDisabled()
+ && img.shapeDown) {
+ img.shapeDown->draw(surface, img.rect.left, img.rect.top);
+ } else if (i == _hoveredImageIndex && !_isButtonDown
+ && !_vm->_mouse->isDisabled()
+ && img.shapeHovered) {
+ img.shapeHovered->draw(surface, img.rect.left, img.rect.top);
} else {
+ // this shape should always be the fall back shape to prevent blinking
if (img.shapeUp) {
img.shapeUp->draw(surface, img.rect.left, img.rect.top);
}