Skip to content

Commit

Permalink
UI|Client: Added a separate color for dialog backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 21, 2013
1 parent 47d0950 commit 3093f4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doomsday/client/data/defaultstyle.pack/colors.dei
Expand Up @@ -35,6 +35,10 @@ group progress {
}
}

group dialog {
color background { rgb $= gui.colorAlpha(background.rgb, 0.9) }
}

group editor {
color cursor { rgb $= gui.colorAlpha(accent.rgb, 0.7) }
color hint { rgb $= gui.colorMix(text.rgb, accent.rgb, 0.5) }
Expand Down
9 changes: 7 additions & 2 deletions doomsday/client/src/ui/widgets/dialogwidget.cpp
Expand Up @@ -258,13 +258,18 @@ DialogWidget::DialogWidget(String const &name)
{
setOpeningDirection(ui::NoDirection);

Background bg = background();
if(!App_GameLoaded()) // blurring is not yet compatible with game rendering
{
Background bg = background();
/// @todo Should use the Style for this.
bg.type = Background::BlurredWithBorderGlow;
bg.solidFill = Vector4f(0, 0, 0, .65f);
set(bg);
}
else
{
bg.solidFill = style().colors().colorf("dialog.background");
}
set(bg);
}

void DialogWidget::setModality(DialogWidget::Modality modality)
Expand Down

0 comments on commit 3093f4f

Please sign in to comment.