mirror of https://github.com/OpenTTD/OpenTTD
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.pull/7258/head
parent
6dfe36b5cd
commit
6733b71300
|
@ -1401,15 +1401,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt)
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case WID_SM_MAP: { // Map window
|
case WID_SM_MAP: { // Map window
|
||||||
/*
|
if (click_count > 0) this->mouse_capture_widget = widget;
|
||||||
* 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;
|
|
||||||
|
|
||||||
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP);
|
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP);
|
||||||
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
|
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
|
||||||
|
|
Loading…
Reference in New Issue