summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-30 18:34:48 +0000
committerfrosch <frosch@openttd.org>2010-01-30 18:34:48 +0000
commit88019e64e1de6966c9cfe26beda537664332d7ec (patch)
tree4e907f0b62170a086d3297d50ff5743cacb4491c /src/industry_gui.cpp
parent2f6fe85f23256a116cb4e85606c8714d8fc8a399 (diff)
downloadopenttd-88019e64e1de6966c9cfe26beda537664332d7ec.tar.xz
(svn r18966) -Codechange: Remove Window::OnDoubleClick() in favour of a parameter for OnClick().
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 97b238037..e5902c490 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -391,13 +391,7 @@ public:
this->DrawWidgets();
}
- virtual void OnDoubleClick(Point pt, int widget)
- {
- if (widget != DPIW_MATRIX_WIDGET) return;
- this->OnClick(pt, DPIW_FUND_WIDGET);
- }
-
- virtual void OnClick(Point pt, int widget)
+ virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case DPIW_MATRIX_WIDGET: {
@@ -419,6 +413,7 @@ public:
}
this->SetWidgetDisabledState(DPIW_FUND_WIDGET, !this->enabled[this->selected_index]);
+ if (this->enabled[this->selected_index] && click_count > 1) this->OnClick(pt, DPIW_FUND_WIDGET, 1);
}
} break;
@@ -703,7 +698,7 @@ public:
if (widget == IVW_INFO) size->height = this->info_height;
}
- virtual void OnClick(Point pt, int widget)
+ virtual void OnClick(Point pt, int widget, int click_count)
{
Industry *i;
@@ -1105,7 +1100,7 @@ public:
}
- virtual void OnClick(Point pt, int widget)
+ virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case IDW_DROPDOWN_ORDER: