From 7fa98e33ce4a7478cdb56c0f4d66f0028a4cdc53 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 31 Aug 2008 20:54:01 +0000 Subject: (svn r14209) -Feature(tte): doubleclick to join selected server/company --- src/network/network_gui.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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[] = { -- cgit v1.2.3-70-g09d2