Skip to content

Commit

Permalink
Tutorial|Client: Final tutorial step only needs the "Done" button
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 13, 2014
1 parent 0f4e30b commit bd0a65d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions doomsday/client/src/ui/widgets/consolewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ using namespace de;

static TimeDelta const LOG_OPEN_CLOSE_SPAN = 0.2;

static uint const POS_SCRIPT_MODE = 5;

DENG_GUI_PIMPL(ConsoleWidget),
DENG2_OBSERVES(Variable, Change)
{
Expand Down
12 changes: 8 additions & 4 deletions doomsday/client/src/ui/widgets/tutorialwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,20 @@ DENG_GUI_PIMPL(TutorialWidget)
}

current = s;
bool const isFinalStep = (current == Finish - 1);

dlg = new MessageDialog;
dlg->useInfoStyle();
dlg->setDeleteAfterDismissed(true);
dlg->setClickToClose(false);
QObject::connect(dlg, SIGNAL(accepted(int)), thisPublic, SLOT(continueToNextStep()));
QObject::connect(dlg, SIGNAL(rejected(int)), thisPublic, SLOT(stop()));
dlg->buttons()
<< new DialogButtonItem(DialogWidget::Accept | DialogWidget::Default,
(current == Finish - 1)? tr("Done") : tr("Continue"))
<< new DialogButtonItem(DialogWidget::Reject | DialogWidget::Action, tr("Skip Tutorial"));
dlg->buttons() << new DialogButtonItem(DialogWidget::Accept | DialogWidget::Default,
isFinalStep? tr("Done") : tr("Continue"));
if(!isFinalStep)
{
dlg->buttons() << new DialogButtonItem(DialogWidget::Reject | DialogWidget::Action, tr("Skip Tutorial"));
}

// Insert the content for the dialog.
ClientWindow &win = ClientWindow::main();
Expand Down

0 comments on commit bd0a65d

Please sign in to comment.