aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/dialogs/dialogs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-27 21:25:34 -0400
committerPaul Gilbert2018-03-27 21:25:34 -0400
commit4830fb647c5d2863481dd102c607eecc5790e409 (patch)
treed7934c0a4a4269f4d58126bef4a27b27f2090ccf /engines/xeen/dialogs/dialogs.cpp
parent8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787 (diff)
downloadscummvm-rg350-4830fb647c5d2863481dd102c607eecc5790e409.tar.gz
scummvm-rg350-4830fb647c5d2863481dd102c607eecc5790e409.tar.bz2
scummvm-rg350-4830fb647c5d2863481dd102c607eecc5790e409.zip
XEEN: Fixes for the buttons in the Items dialog
Diffstat (limited to 'engines/xeen/dialogs/dialogs.cpp')
-rw-r--r--engines/xeen/dialogs/dialogs.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/xeen/dialogs/dialogs.cpp b/engines/xeen/dialogs/dialogs.cpp
index ba7fe783c3..3e777ba232 100644
--- a/engines/xeen/dialogs/dialogs.cpp
+++ b/engines/xeen/dialogs/dialogs.cpp
@@ -118,8 +118,7 @@ bool ButtonContainer::checkEvents(XeenEngine *vm) {
if (btn._draw && btn._value == _buttonValue) {
// Found the correct button
// Draw button depressed
- btn._sprites->draw(0, btn._frameNum + 1,
- Common::Point(btn._bounds.left, btn._bounds.top));
+ btn._sprites->draw(0, btn._selectedFrame, Common::Point(btn._bounds.left, btn._bounds.top));
win.setBounds(btn._bounds);
win.update();
@@ -128,8 +127,7 @@ bool ButtonContainer::checkEvents(XeenEngine *vm) {
events.wait(2);
// Redraw button in it's original non-depressed form
- btn._sprites->draw(0, btn._frameNum,
- Common::Point(btn._bounds.left, btn._bounds.top));
+ btn._sprites->draw(0, btn._frameNum, Common::Point(btn._bounds.left, btn._bounds.top));
win.setBounds(btn._bounds);
win.update();
break;
@@ -146,6 +144,7 @@ void ButtonContainer::drawButtons(XSurface *surface) {
for (uint btnIndex = 0; btnIndex < _buttons.size(); ++btnIndex) {
UIButton &btn = _buttons[btnIndex];
if (btn._draw) {
+ assert(btn._sprites);
btn._sprites->draw(*surface, btn._frameNum,
Common::Point(btn._bounds.left, btn._bounds.top));
}