Skip to content

Commit

Permalink
UI|Home: Show title image when selecting packages for a new game profile
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 24, 2016
1 parent 64993d9 commit b926e3e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doomsday/apps/client/src/ui/dialogs/createprofiledialog.cpp
Expand Up @@ -36,6 +36,7 @@ DENG_GUI_PIMPL(CreateProfileDialog)
DialogContentStylist stylist;
bool editing = false;
String oldName;
std::unique_ptr<GameProfile> tempProfile;

Instance(Public *i) : Base(i) {}

Expand Down Expand Up @@ -67,6 +68,12 @@ DENG_GUI_PIMPL(CreateProfileDialog)

self.buttonWidget(Id1)->enable(valid);
}

void gameChanged()
{
// Used with the PackagesButtonWidget.
tempProfile->setGame(gameChoice->selectedItem().data().toString());
}
};

CreateProfileDialog::CreateProfileDialog(String const &gameFamily)
Expand Down Expand Up @@ -95,6 +102,8 @@ CreateProfileDialog::CreateProfileDialog(String const &gameFamily)
// Packages selection.
form->add(d->packages = new PackagesButtonWidget);
d->packages->setNoneLabel(tr("None"));
d->tempProfile.reset(new GameProfile);
d->packages->setGameProfile(*d->tempProfile);

GridLayout layout(form->rule().left(), form->rule().top() + rule("dialog.gap"));
layout.setGridSize(2, 0);
Expand All @@ -115,6 +124,8 @@ CreateProfileDialog::CreateProfileDialog(String const &gameFamily)

updateLayout();

d->gameChanged();
connect(d->gameChoice, &ChoiceWidget::selectionChanged, [this] () { d->gameChanged(); });
connect(&editor(), &LineEditWidget::editorContentChanged,
[this] () { d->checkValidProfileName(); });
}
Expand Down

0 comments on commit b926e3e

Please sign in to comment.