From 456528f2303af5da98c518ac0c8fc258dc3c9a81 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 10 Dec 2024 00:00:53 +0100 Subject: [PATCH] Some tweaks, not much progress. --- src/midi-node.h | 6 +++--- src/node.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/midi-node.h b/src/midi-node.h index fc7e204..65d0516 100644 --- a/src/midi-node.h +++ b/src/midi-node.h @@ -216,9 +216,9 @@ namespace VISEQ::GRAPH::NODES { void draw(Vec2Df mouse, Camera2D cam) override { Node::draw(); if(hovering()) { - radius += radius < 25 ? 2 : 0; + radius += radius < hover_radius ? 2 : 0; } else { - radius -= radius > 15 ? 2 : 0; + radius -= radius > node_radius ? 2 : 0; } if(hovering() || selected) interact(); @@ -262,7 +262,7 @@ namespace VISEQ::GRAPH::NODES { if(hovering()){ for(int i = 0; i < 16; ++i){ - channelButtons.at(i).position = position.orbitAtAngle(21.0, DEG2RAD * (360.0f/16.0f)*i); + channelButtons.at(i).position = position.orbitAtAngle(radius - 6.0f, DEG2RAD * (360.0f/16.0f)*i); Color col = VS_COLOR_YELLOW; if(mode == 0 && midiNote.channel == i) col = VS_COLOR_PINK; if(mode == 1 && midiCC.channel == i) col = VS_COLOR_PINK; diff --git a/src/node.h b/src/node.h index 70308db..3bab18f 100644 --- a/src/node.h +++ b/src/node.h @@ -35,6 +35,8 @@ namespace VISEQ::GRAPH::NODES { Distribution distributionMode = Distribution::GEOMETRIC; float radius = 15.0f; + float node_radius = 15.0f; + float hover_radius = 32.0f; bool config = false; bool triggered = false;