Browse Source

Add radial halo around mouse cursor in RackWidget.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
f374dd4c29
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/app/RackWidget.cpp

+ 3
- 1
src/app/RackWidget.cpp View File

@@ -127,7 +127,9 @@ void RackWidget::draw(const DrawArgs& args) {
if (b < 1.f) {
nvgBeginPath(args.vg);
nvgRect(args.vg, 0.0, 0.0, VEC_ARGS(box.size));
nvgFillColor(args.vg, nvgRGBAf(0, 0, 0, 1.f - b));
const float radius = 300.0;
const float brightness = 0.2f;
nvgFillPaint(args.vg, nvgRadialGradient(args.vg, VEC_ARGS(internal->mousePos), 0.0, radius, nvgRGBAf(0, 0, 0, 1.f - b - brightness), nvgRGBAf(0, 0, 0, 1.f - b)));
nvgFill(args.vg);
}



Loading…
Cancel
Save