Skip to content

Commit

Permalink
Shell|GUI: Permanent game status in status bar, adjusted margins
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 19, 2013
1 parent 6644f30 commit d330c20
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions doomsday/tools/shell/shell-gui/src/linkwindow.cpp
Expand Up @@ -67,6 +67,7 @@ DENG2_PIMPL(LinkWindow)
QStackedWidget *stack;
StatusWidget *status;
QtRootWidget *root;
QLabel *gameStatus;
QLabel *timeCounter;
QLabel *currentHost;
QAction *stopAction;
Expand All @@ -83,6 +84,7 @@ DENG2_PIMPL(LinkWindow)
stack(0),
status(0),
root(0),
gameStatus(0),
timeCounter(0),
currentHost(0)
{
Expand Down Expand Up @@ -144,6 +146,7 @@ DENG2_PIMPL(LinkWindow)
disconnectAction->setDisabled(true);
#endif

gameStatus->clear();
status->linkDisconnected();
updateCurrentHost();
updateStyle();
Expand Down Expand Up @@ -175,7 +178,7 @@ DENG2_PIMPL(LinkWindow)
if(!mapId.isEmpty()) msg += " " + mapId;
if(!rules.isEmpty()) msg += " (" + rules + ")";

self.statusBar()->showMessage(msg);
gameStatus->setText(statusText(msg));
}
};

Expand Down Expand Up @@ -244,8 +247,13 @@ LinkWindow::LinkWindow(QWidget *parent)
statusFont.setPointSize(font().pointSize() * 4 / 5);
statusBar()->setFont(statusFont);
#endif
d->timeCounter = new QLabel(statusText("0:00:00"));
d->gameStatus = new QLabel;
d->gameStatus->setContentsMargins(6, 0, 6, 0);
d->currentHost = new QLabel;
d->currentHost->setContentsMargins(6, 0, 6, 0);
d->timeCounter = new QLabel(statusText("0:00:00"));
d->timeCounter->setContentsMargins(6, 0, 0, 0);
statusBar()->addPermanentWidget(d->gameStatus);
statusBar()->addPermanentWidget(d->currentHost);
statusBar()->addPermanentWidget(d->timeCounter);

Expand Down

0 comments on commit d330c20

Please sign in to comment.