diff options
author | Andrew Kurushin | 2005-04-18 20:03:14 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-04-18 20:03:14 +0000 |
commit | d52032c75c4c3964219874d68ec9a84dc8e6f3fa (patch) | |
tree | c66544dde7b5bf7bbbaf991b369c048411a2492e /saga/input.cpp | |
parent | 3ea96a13a053e803435e93b20cf07d01d0c3d821 (diff) | |
download | scummvm-rg350-d52032c75c4c3964219874d68ec9a84dc8e6f3fa.tar.gz scummvm-rg350-d52032c75c4c3964219874d68ec9a84dc8e6f3fa.tar.bz2 scummvm-rg350-d52032c75c4c3964219874d68ec9a84dc8e6f3fa.zip |
converse support improved (still has some bugs)
fixed: now protagonist can't be target object
fixed: statusbar color
added: *mouseButtonPressed in SagaEngine
svn-id: r17672
Diffstat (limited to 'saga/input.cpp')
-rw-r--r-- | saga/input.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/saga/input.cpp b/saga/input.cpp index f49a6de953..56139ae932 100644 --- a/saga/input.cpp +++ b/saga/input.cpp @@ -38,7 +38,7 @@ namespace Saga { int SagaEngine::processInput() { OSystem::Event event; - Point imousePt; +// Point imousePt; while (g_system->pollEvent(event)) { switch (event.type) { @@ -101,17 +101,24 @@ int SagaEngine::processInput() { break; } break; + case OSystem::EVENT_LBUTTONUP: + _leftMouseButtonPressed = false; + break; + case OSystem::EVENT_RBUTTONUP: + _rightMouseButtonPressed = false; + break; case OSystem::EVENT_LBUTTONDOWN: + _leftMouseButtonPressed = true; + _mousePos = event.mouse; + _interface->update(_mousePos, UPDATE_LEFTBUTTONCLICK); + break; case OSystem::EVENT_RBUTTONDOWN: - _mousePos.x = event.mouse.x; - _mousePos.y = event.mouse.y; - imousePt = _mousePos; - _interface->update(imousePt, (event.type == OSystem::EVENT_LBUTTONDOWN) ? UPDATE_LEFTBUTTONCLICK : UPDATE_RIGHTBUTTONCLICK); + _rightMouseButtonPressed = true; + _mousePos = event.mouse; + _interface->update(_mousePos, UPDATE_RIGHTBUTTONCLICK); break; case OSystem::EVENT_MOUSEMOVE: - _mousePos.x = event.mouse.x; - _mousePos.y = event.mouse.y; - imousePt = _mousePos; + _mousePos = event.mouse; break; case OSystem::EVENT_QUIT: _system->quit(); @@ -124,9 +131,6 @@ int SagaEngine::processInput() { return SUCCESS; } -Point SagaEngine::getMousePos() { - return _mousePos; -} } // End of namespace Saga |