diff options
Diffstat (limited to 'engines/lab/eventman.cpp')
| -rw-r--r-- | engines/lab/eventman.cpp | 24 | 
1 files changed, 8 insertions, 16 deletions
diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index a94ddbf16b..f9b3d2f388 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -30,6 +30,8 @@  #include "common/events.h" +#include "graphics/cursorman.h" +  #include "lab/lab.h"  #include "lab/dispman.h" @@ -76,17 +78,7 @@ Button *EventManager::checkButtonHit(ButtonList *buttonList, Common::Point pos)  		Common::Rect buttonRect(button->_x, button->_y, button->_x + button->_image->_width - 1, button->_y + button->_image->_height - 1);  		if (buttonRect.contains(pos) && button->_isEnabled) { -			if (_vm->_isHiRes) { -				_hitButton = button; -			} else { -				button->_altImage->drawImage(button->_x, button->_y); - -				for (int i = 0; i < 3; i++) -					_vm->waitTOF(); - -				button->_image->drawImage(button->_x, button->_y); -			} - +			_hitButton = button;  			return button;  		}  	} @@ -125,18 +117,18 @@ void EventManager::updateMouse() {  }  void EventManager::initMouse() { -	_vm->_system->setMouseCursor(mouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0); -	_vm->_system->showMouse(false); +	CursorMan.pushCursor(mouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0); +	CursorMan.showMouse(false);  	setMousePos(Common::Point(_vm->_graphics->_screenWidth / 2, _vm->_graphics->_screenHeight / 2));  }  void EventManager::mouseShow() { -	_vm->_system->showMouse(true); +	CursorMan.showMouse(true);  }  void EventManager::mouseHide() { -	_vm->_system->showMouse(false); +	CursorMan.showMouse(false);  }  void EventManager::setMousePos(Common::Point pos) { @@ -154,7 +146,7 @@ void EventManager::processInput() {  		switch (event.type) {  		case Common::EVENT_LBUTTONDOWN:  			if (_screenButtonList) -				curButton = checkButtonHit(_screenButtonList, _vm->_isHiRes ? _mousePos : Common::Point(_mousePos.x / 2, _mousePos.y)); +				curButton = checkButtonHit(_screenButtonList, _mousePos);  			if (curButton)  				_lastButtonHit = curButton;  | 
