summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-08-31 20:54:01 +0000
committersmatz <smatz@openttd.org>2008-08-31 20:54:01 +0000
commit3c5ab035d825efa9b2b652b8de02d3ba908af602 (patch)
treef6f115d0bad5df5bfb8309d4415e85e8af7b1985 /src
parent8b926efae36eb22bdacf1dc7671d2d8b3c6dfb7b (diff)
downloadopenttd-3c5ab035d825efa9b2b652b8de02d3ba908af602.tar.xz
(svn r14209) -Feature(tte): doubleclick to join selected server/company
Diffstat (limited to 'src')
-rw-r--r--src/network/network_gui.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index d8ebfffea..3048f5c56 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -530,6 +530,14 @@ public:
}
}
+ virtual void OnDoubleClick(Point pt, int widget)
+ {
+ if (widget == NGWW_MATRIX) {
+ /* is the Join button enabled? */
+ if (!this->IsWidgetDisabled(NGWW_JOIN)) this->OnClick(pt, NGWW_JOIN);
+ }
+ }
+
virtual void OnDropdownSelect(int widget, int index)
{
switch (widget) {
@@ -1211,6 +1219,14 @@ struct NetworkLobbyWindow : public Window {
break;
}
}
+
+ virtual void OnDoubleClick(Point pt, int widget)
+ {
+ if (widget == NLWW_MATRIX) {
+ /* is the Join button enabled? */
+ if (!this->IsWidgetDisabled(NLWW_JOIN)) this->OnClick(pt, NLWW_JOIN);
+ }
+ }
};
static const Widget _network_lobby_window_widgets[] = {