Skip to content

Commit

Permalink
UI|Cleanup|Client: Moved renderer behavior settings to the Gauge popup
Browse files Browse the repository at this point in the history
These don't really have the prominence or importance to be in the
main Renderer Settings dialog.
  • Loading branch information
skyjake committed Apr 4, 2015
1 parent de70421 commit ecc8581
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 28 deletions.
44 changes: 18 additions & 26 deletions doomsday/client/src/ui/dialogs/renderersettingsdialog.cpp
Expand Up @@ -60,12 +60,6 @@ DENG_GUI_PIMPL(RendererSettingsDialog)
fov->setPrecision(0);
fov->setRange(Ranged(30, 160));

area.add(precacheModels = new CVarToggleWidget("rend-model-precache"));
area.add(precacheSprites = new CVarToggleWidget("rend-sprite-precache"));
area.add(multiLight = new CVarToggleWidget("rend-light-multitex"));
area.add(multiShiny = new CVarToggleWidget("rend-model-shiny-multitex"));
area.add(multiDetail = new CVarToggleWidget("rend-tex-detail-multitex"));

// Set up a separate popup for developer settings.
self.add(devPopup = new GridPopupWidget);

Expand All @@ -81,6 +75,20 @@ DENG_GUI_PIMPL(RendererSettingsDialog)
<< new ChoiceItem(tr("Game world"), 1)
<< new ChoiceItem(tr("Game world and UI"), 2);

precacheModels = new CVarToggleWidget("rend-model-precache", tr("3D Models"));
precacheSprites = new CVarToggleWidget("rend-sprite-precache", tr("Sprites"));
multiLight = new CVarToggleWidget("rend-light-multitex", tr("Dynamic Lights"));
multiShiny = new CVarToggleWidget("rend-model-shiny-multitex", tr("3D Model Shiny Surfaces"));
multiDetail = new CVarToggleWidget("rend-tex-detail-multitex", tr("Surface Details"));

devPopup->addSeparatorLabel(tr("Behavior"));
*devPopup << LabelWidget::newWithText(tr("Precaching:")) << precacheModels
<< Const(0) << precacheSprites
<< LabelWidget::newWithText(tr("Multitexturing:")) << multiLight
<< Const(0) << multiShiny
<< Const(0) << multiDetail;

devPopup->addSeparatorLabel(tr("Diagnosis"));
*devPopup << LabelWidget::newWithText(tr("Surface Texturing:"))
<< rendTex
<< LabelWidget::newWithText(tr("Draw as Wireframe:"))
Expand Down Expand Up @@ -125,18 +133,9 @@ RendererSettingsDialog::RendererSettingsDialog(String const &name)
appearLabel->setName("appearance-label"); // for lookup from tutorial
LabelWidget *fovLabel = LabelWidget::newWithText(tr("Field of View:"), &area());

LabelWidget *precacheLabel = LabelWidget::newWithText(tr("Precaching:"), &area());
d->precacheModels->setText(tr("3D Models"));
d->precacheSprites->setText(tr("Sprites"));

LabelWidget *multiLabel = LabelWidget::newWithText(tr("Multitexturing:"), &area());
d->multiLight->setText(tr("Dynamic Lights"));
d->multiShiny->setText(tr("3D Model Shiny Surfaces"));
d->multiDetail->setText(tr("Surface Details"));

LabelWidget *capLabel = LabelWidget::newWithText(_E(D) + tr("Behavior"), &area());
/*LabelWidget *capLabel = LabelWidget::newWithText(_E(D) + tr("Behavior"), &area());
capLabel->setFont("separator.label");
capLabel->margins().setTop("gap");
capLabel->margins().setTop("gap");*/

// Layout.
GridLayout layout(area().contentRule().left(), area().contentRule().top());
Expand All @@ -150,15 +149,8 @@ RendererSettingsDialog::RendererSettingsDialog(String const &name)
layout << *fovLabel << *d->fov;

// Label for the tech caps.
layout.setCellAlignment(Vector2i(0, 2), ui::AlignLeft);
layout.append(*capLabel, 2);

layout
<< *precacheLabel << *d->precacheModels
<< Const(0) << *d->precacheSprites
<< *multiLabel << *d->multiLight
<< Const(0) << *d->multiShiny
<< Const(0) << *d->multiDetail;
//layout.setCellAlignment(Vector2i(0, 2), ui::AlignLeft);
//layout.append(*capLabel, 2);

area().setContentSize(layout.width(), layout.height());

Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/ui/dialogs/videosettingsdialog.cpp
Expand Up @@ -308,9 +308,9 @@ VideoSettingsDialog::VideoSettingsDialog(String const &name)
modeLayout.setCellAlignment(Vector2i(0, modeLayout.gridSize().y), ui::AlignLeft);
modeLayout.append(*aspectLabel, 2)
<< *LabelWidget::newWithText(tr("Player Weapons:"), &area()) << *d->hudAspect
<< *LabelWidget::newWithText(tr("Menus:"), &area()) << *d->menuAspect
<< *LabelWidget::newWithText(tr("Intermissions:"), &area()) << *d->inludeAspect
<< *LabelWidget::newWithText(tr("Finales:"), &area()) << *d->finaleAspect;
<< *LabelWidget::newWithText(tr("Finales:"), &area()) << *d->finaleAspect
<< *LabelWidget::newWithText(tr("Menus:"), &area()) << *d->menuAspect;
}

area().setContentSize(OperatorRule::maximum(layout.width(), modeLayout.width()),
Expand Down

0 comments on commit ecc8581

Please sign in to comment.