diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-02-14 06:27:16 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-02-21 08:11:35 +0000 |
commit | 6733b713009622b8a416227fe4cb0b754e8cb855 (patch) | |
tree | 9ea5dd57ae217c6c215473cc31b821e8182705ad /src | |
parent | 6dfe36b5cde442b40208e1cebb4b2c7b2f08a4b1 (diff) | |
download | openttd-6733b713009622b8a416227fe4cb0b754e8cb855.tar.xz |
Change: Make mini-map widget capture mouse when left-click dragging.
This allows the mini-map to be dragged when the cursor has left the widget.
Diffstat (limited to 'src')
-rw-r--r-- | src/smallmap_gui.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 10eeca5d3..e4a091927 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1401,15 +1401,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt) { switch (widget) { case WID_SM_MAP: { // Map window - /* - * XXX: scrolling with the left mouse button is done by subsequently - * clicking with the left mouse button; clicking once centers the - * large map at the selected point. So by unclicking the left mouse - * button here, it gets reclicked during the next inputloop, which - * would make it look like the mouse is being dragged, while it is - * actually being (virtually) clicked every inputloop. - */ - _left_button_clicked = false; + if (click_count > 0) this->mouse_capture_widget = widget; const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP); Window *w = FindWindowById(WC_MAIN_WINDOW, 0); |