Tweak curtains
This commit is contained in:
parent
bd899ad6ab
commit
b51f8ee2dd
1 changed files with 19 additions and 3 deletions
|
|
@ -1481,15 +1481,31 @@ namespace gmtk
|
|||
{
|
||||
float w = (view_box_[0].length() - view_box_[1].length()) / 2.f;
|
||||
geom::vector t{view_box_[1].length() / 5.f, 0.f};
|
||||
geom::vector d{w - t[0], 0.f};
|
||||
geom::vector n{w, 0.f};
|
||||
geom::vector d{w, 0.f};
|
||||
geom::vector n{w + t[0], 0.f};
|
||||
|
||||
auto p00 = view_box_.corner(0, 0);
|
||||
auto p01 = view_box_.corner(0, 1);
|
||||
auto p10 = view_box_.corner(1, 0);
|
||||
auto p11 = view_box_.corner(1, 1);
|
||||
|
||||
gfx::color_rgba c1{255, 255, 255, 255};
|
||||
float s = 0.f;
|
||||
if (view_stack_.size() > 1)
|
||||
{
|
||||
if (view_transition_ && view_transition_->old.level == -1)
|
||||
s = 2.f * view_transition_->timer;
|
||||
else
|
||||
s = 1.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (view_transition_)
|
||||
s = 1.f - 2.f * view_transition_->timer;
|
||||
else
|
||||
s = 0.f;
|
||||
}
|
||||
|
||||
gfx::color_rgba c1{255, 255, 255, std::round(224.f * s)};
|
||||
gfx::color_rgba c0{255, 255, 255, 0};
|
||||
|
||||
painter_.triangle(p00, p00 + d, p01 + d, c1, c1, c1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue