summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-05-30 12:15:28 +0000
committeralberth <alberth@openttd.org>2010-05-30 12:15:28 +0000
commitce0e1cbb3f69ab43d8c634c3bb0eb229a09f876d (patch)
tree6cc64cc149afdda21f7de34037f2d12adc69ed2d /src/viewport.cpp
parent113f3ef0ebafcc637d061e955a162751cf011f8f (diff)
downloadopenttd-ce0e1cbb3f69ab43d8c634c3bb0eb229a09f876d.tar.xz
(svn r19905) -Codechange: Use EventState for mouse handling routines.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 171c0b6fc..03b21f409 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2640,23 +2640,23 @@ calc_heightdiff_single_direction:;
/**
* Handle the mouse while dragging for placement/resizing.
- * @return Boolean whether search for a handler should continue
+ * @return State of handling the event.
*/
-bool VpHandlePlaceSizingDrag()
+EventState VpHandlePlaceSizingDrag()
{
- if (_special_mouse_mode != WSM_SIZING) return true;
+ if (_special_mouse_mode != WSM_SIZING) return ES_NOT_HANDLED;
/* stop drag mode if the window has been closed */
Window *w = FindWindowById(_thd.window_class, _thd.window_number);
if (w == NULL) {
ResetObjectToPlace();
- return false;
+ return ES_HANDLED;
}
/* while dragging execute the drag procedure of the corresponding window (mostly VpSelectTilesWithMethod() ) */
if (_left_button_down) {
w->OnPlaceDrag(_thd.select_method, _thd.select_proc, GetTileBelowCursor());
- return false;
+ return ES_HANDLED;
}
/* mouse button released..
@@ -2675,7 +2675,7 @@ bool VpHandlePlaceSizingDrag()
w->OnPlaceMouseUp(_thd.select_method, _thd.select_proc, _thd.selend, TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y));
- return false;
+ return ES_HANDLED;
}
void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w)