Improved visual indication on Mixing active/inactive area.

This commit is contained in:
brunoherbelin
2020-06-22 19:01:40 +02:00
parent 4df2063a47
commit 8b35b0b4fe
3 changed files with 12 additions and 6 deletions

View File

@@ -158,6 +158,11 @@ MixingView::MixingView() : View(MIXING), limbo_scale_(1.3f)
// Mixing scene background
Mesh *disk = new Mesh("mesh/disk.ply");
disk->scale_ = glm::vec3(limbo_scale_, limbo_scale_, 1.f);
disk->shader()->color = glm::vec4( COLOR_LIMBO_CIRCLE, 0.6f );
scene.bg()->attach(disk);
disk = new Mesh("mesh/disk.ply");
disk->setTexture(textureMixingQuadratic());
scene.bg()->attach(disk);
@@ -165,10 +170,6 @@ MixingView::MixingView() : View(MIXING), limbo_scale_(1.3f)
circle->shader()->color = glm::vec4( COLOR_FRAME, 0.9f );
scene.bg()->attach(circle);
circle = new Mesh("mesh/circle.ply");
circle->scale_ = glm::vec3(limbo_scale_, limbo_scale_, 1.f);
circle->shader()->color = glm::vec4( COLOR_LIMBO_CIRCLE, 0.6f );
scene.bg()->attach(circle);
}
@@ -210,7 +211,11 @@ View::Cursor MixingView::grab (Source *s, glm::vec2 from, glm::vec2 to, std::pai
s->touch();
std::ostringstream info;
if (s->active())
info << "Alpha " << std::fixed << std::setprecision(3) << s->blendingShader()->color.a;
else
info << "Inactive";
return Cursor(Cursor_ResizeAll, info.str() );
}

View File

@@ -57,7 +57,7 @@
#define COLOR_DEFAULT_SOURCE 0.8f, 0.8f, 0.8f
#define COLOR_HIGHLIGHT_SOURCE 1.f, 1.f, 1.f
#define COLOR_FRAME 0.8f, 0.f, 0.8f
#define COLOR_LIMBO_CIRCLE 0.7f, 0.7f, 0.7f
#define COLOR_LIMBO_CIRCLE 0.16f, 0.16f, 0.16f
// from glmixer
#define TEXTURE_REQUIRED_MAXIMUM 2048

View File

@@ -139,3 +139,4 @@ end_header
3 51 53 56
3 59 57 55
3 10 18 4