mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
SAGA: Make use of EventManager::getMousePos
svn-id: r26223
This commit is contained in:
parent
f1497d5aa9
commit
94739cdbca
@ -40,8 +40,6 @@ namespace Saga {
|
||||
int SagaEngine::processInput() {
|
||||
Common::Event event;
|
||||
|
||||
// Point imousePt;
|
||||
|
||||
Common::EventManager *eventMan = _system->getEventManager();
|
||||
while (eventMan->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
@ -129,22 +127,19 @@ int SagaEngine::processInput() {
|
||||
break;
|
||||
case Common::EVENT_LBUTTONDOWN:
|
||||
_leftMouseButtonPressed = true;
|
||||
_mousePos = event.mouse;
|
||||
_interface->update(_mousePos, UPDATE_LEFTBUTTONCLICK);
|
||||
_interface->update(event.mouse, UPDATE_LEFTBUTTONCLICK);
|
||||
break;
|
||||
case Common::EVENT_RBUTTONDOWN:
|
||||
_rightMouseButtonPressed = true;
|
||||
_mousePos = event.mouse;
|
||||
_interface->update(_mousePos, UPDATE_RIGHTBUTTONCLICK);
|
||||
_interface->update(event.mouse, UPDATE_RIGHTBUTTONCLICK);
|
||||
break;
|
||||
case Common::EVENT_WHEELUP:
|
||||
_interface->update(_mousePos, UPDATE_WHEELUP);
|
||||
_interface->update(event.mouse, UPDATE_WHEELUP);
|
||||
break;
|
||||
case Common::EVENT_WHEELDOWN:
|
||||
_interface->update(_mousePos, UPDATE_WHEELDOWN);
|
||||
_interface->update(event.mouse, UPDATE_WHEELDOWN);
|
||||
break;
|
||||
case Common::EVENT_MOUSEMOVE:
|
||||
_mousePos = event.mouse;
|
||||
break;
|
||||
case Common::EVENT_QUIT:
|
||||
shutDown();
|
||||
@ -157,6 +152,9 @@ int SagaEngine::processInput() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
Point SagaEngine::mousePos() const {
|
||||
return _system->getEventManager()->getMousePos();
|
||||
}
|
||||
|
||||
} // End of namespace Saga
|
||||
|
||||
|
@ -331,9 +331,7 @@ public:
|
||||
const char *getObjectName(uint16 objectId);
|
||||
public:
|
||||
int processInput(void);
|
||||
const Point &mousePos() const {
|
||||
return _mousePos;
|
||||
}
|
||||
Point mousePos() const;
|
||||
|
||||
const bool leftMouseButtonPressed() const {
|
||||
return _leftMouseButtonPressed;
|
||||
@ -354,7 +352,6 @@ public:
|
||||
bool _saveMarks[MAX_SAVES];
|
||||
SaveGameHeader _saveHeader;
|
||||
|
||||
Point _mousePos;
|
||||
bool _leftMouseButtonPressed;
|
||||
bool _rightMouseButtonPressed;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user