diff options
author | rubidium <rubidium@openttd.org> | 2008-05-09 15:27:00 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-09 15:27:00 +0000 |
commit | 8d0a7f4634b73a4e146230b72c2e48cc463bf748 (patch) | |
tree | b0aab17d5b33d2a5b5bdd78514799a53ae27ef97 /src/window.cpp | |
parent | 0f7d925121beb1033917918478c7d213305de595 (diff) | |
download | openttd-8d0a7f4634b73a4e146230b72c2e48cc463bf748.tar.xz |
(svn r13025) -Codechange: remove the need for two WindowEvents.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/window.cpp b/src/window.cpp index 742b63c71..51957bcce 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -44,7 +44,6 @@ byte _scroller_click_timeout; bool _scrolling_scrollbar; bool _scrolling_viewport; -bool _popup_menu_active; byte _special_mouse_mode; @@ -1131,31 +1130,6 @@ static bool HandleDragDrop() return false; } -static bool HandlePopupMenu() -{ - if (!_popup_menu_active) return true; - - Window *w = FindWindowById(WC_TOOLBAR_MENU, 0); - if (w == NULL) { - _popup_menu_active = false; - return false; - } - - WindowEvent e; - if (_left_button_down) { - e.event = WE_POPUPMENU_OVER; - e.we.popupmenu.pt = _cursor.pos; - } else { - _popup_menu_active = false; - e.event = WE_POPUPMENU_SELECT; - e.we.popupmenu.pt = _cursor.pos; - } - - w->HandleWindowEvent(&e); - - return false; -} - static bool HandleMouseOver() { Window *w = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y); @@ -1827,7 +1801,6 @@ void MouseLoop(MouseClick click, int mousewheel) UpdateTileSelection(); if (!VpHandlePlaceSizingDrag()) return; if (!HandleDragDrop()) return; - if (!HandlePopupMenu()) return; if (!HandleWindowDragging()) return; if (!HandleScrollbarScrolling()) return; if (!HandleViewportScroll()) return; |