Browse Source

Tint/dim port only when left-dragging.

tags/v2.6.0
Andrew Belt 5 months ago
parent
commit
9d70bad7aa
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/app/PortWidget.cpp

+ 2
- 1
src/app/PortWidget.cpp View File

@@ -374,8 +374,9 @@ void PortWidget::step() {




void PortWidget::draw(const DrawArgs& args) { void PortWidget::draw(const DrawArgs& args) {
// Check if left-dragging a PortWidget
PortWidget* draggedPw = dynamic_cast<PortWidget*>(APP->event->getDraggedWidget()); PortWidget* draggedPw = dynamic_cast<PortWidget*>(APP->event->getDraggedWidget());
if (draggedPw) {
if (draggedPw && APP->event->dragButton == GLFW_MOUSE_BUTTON_LEFT) {
if (draggedPw->internal->draggedType != type) { if (draggedPw->internal->draggedType != type) {
// Dim the PortWidget if the active cable cannot plug into this PortWidget // Dim the PortWidget if the active cable cannot plug into this PortWidget
nvgTint(args.vg, nvgRGBf(0.33, 0.33, 0.33)); nvgTint(args.vg, nvgRGBf(0.33, 0.33, 0.33));


Loading…
Cancel
Save