Skip to content

Commit

Permalink
UI|Home: "Connect to Server" is available via the MP column menu
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 16, 2016
1 parent ec18d8d commit 31d9a62
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doomsday/apps/client/src/ui/home/multiplayercolumnwidget.cpp
Expand Up @@ -18,10 +18,16 @@

#include "ui/home/multiplayercolumnwidget.h"
#include "ui/widgets/multiplayerservermenuwidget.h"
#include "ui/widgets/taskbarwidget.h"
#include "ui/home/headerwidget.h"
#include "ui/clientwindow.h"
#include "clientapp.h"

#include <doomsday/Games>
#include <de/PopupButtonWidget>
#include <de/PopupMenuWidget>
#include <de/SignalAction>
#include <de/ui/SubwidgetItem>

using namespace de;

Expand All @@ -35,6 +41,14 @@ DENG_GUI_PIMPL(MultiplayerColumnWidget)
ScrollAreaWidget &area = self.scrollArea();
area.add(menu = new MultiplayerServerMenuWidget);

self.header().menuButton().setPopup([] (PopupButtonWidget const &) -> PopupWidget * {
auto *menu = new PopupMenuWidget;
menu->items() << new ui::ActionItem(tr("Connect to Server..."),
new SignalAction(&ClientWindow::main().taskBar(),
SLOT(connectToServerManually())));
return menu;
}, ui::Down);

menu->rule()
.setInput(Rule::Width, area.contentRule().width())
.setInput(Rule::Left, area.contentRule().left())
Expand Down

0 comments on commit 31d9a62

Please sign in to comment.