summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-09 15:27:00 +0000
committerrubidium <rubidium@openttd.org>2008-05-09 15:27:00 +0000
commit68a1d75d9e351fa28db90937b5dae0f2d0cd2ff3 (patch)
treeb0aab17d5b33d2a5b5bdd78514799a53ae27ef97 /src/window.cpp
parentf4387004025efb3860a2934ed6d82a7e6f1cd716 (diff)
downloadopenttd-68a1d75d9e351fa28db90937b5dae0f2d0cd2ff3.tar.xz
(svn r13025) -Codechange: remove the need for two WindowEvents.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp27
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;