Skip to content

Commit

Permalink
WAGE: Rename mouse event processor to add clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent 52c317b commit 63ef49e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions engines/wage/gui.cpp
Expand Up @@ -612,7 +612,7 @@ void Gui::mouseMove(int x, int y) {
}
}

Designed *Gui::getClickTarget(int x, int y) {
Designed *Gui::mouseUp(int x, int y) {
if (_menu->_menuActivated) {
if (_menu->mouseRelease(x, y)) {
_sceneDirty = true;
Expand Down Expand Up @@ -648,7 +648,7 @@ Designed *Gui::getClickTarget(int x, int y) {
return NULL;
}

void Gui::mouseClick(int x, int y) {
void Gui::mouseDown(int x, int y) {
if (_menu->mouseClick(x, y))
_menuDirty = true;
}
Expand Down
4 changes: 2 additions & 2 deletions engines/wage/gui.h
Expand Up @@ -93,8 +93,8 @@ class Gui {
void appendText(const char *str);
void clearOutput();
void mouseMove(int x, int y);
void mouseClick(int x, int y);
Designed *getClickTarget(int x, int y);
void mouseDown(int x, int y);
Designed *mouseUp(int x, int y);
void drawInput();
void setSceneDirty() { _sceneDirty = true; }
const Graphics::Font *getFont(const char *name, Graphics::FontManager::FontUsage fallback);
Expand Down
4 changes: 2 additions & 2 deletions engines/wage/wage.cpp
Expand Up @@ -148,11 +148,11 @@ void WageEngine::processEvents() {
_gui->mouseMove(event.mouse.x, event.mouse.y);
break;
case Common::EVENT_LBUTTONDOWN:
_gui->mouseClick(event.mouse.x, event.mouse.y);
_gui->mouseDown(event.mouse.x, event.mouse.y);
break;
case Common::EVENT_LBUTTONUP:
{
Designed *obj = _gui->getClickTarget(event.mouse.x, event.mouse.y);
Designed *obj = _gui->mouseUp(event.mouse.x, event.mouse.y);
if (obj != NULL)
processTurn(NULL, obj);
}
Expand Down

0 comments on commit 63ef49e

Please sign in to comment.