Super simple events added. Seems to be a good way for handling interaction. Modified a few base classes.

This commit is contained in:
Sebastian
2024-11-24 03:08:06 +01:00
parent 62a5c53969
commit f04838bffa
14 changed files with 160 additions and 67 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
#pragma once
#include "datatypes.h"
#include "graph-item.h"
#include "node.h"
#include "raymath.h"
#include <map>
@@ -13,7 +12,6 @@ namespace VISEQ::GRAPH::NODES {
class MidiNode : public Node{
public:
using GraphItem::state;
struct NodeMidiOut{
int i;
@@ -89,7 +87,7 @@ namespace VISEQ::GRAPH::NODES {
float wheel = GetMouseWheelMove();
if(KEYS_DOWN.ctrl && !KEYS_DOWN.alt){
switch(GraphItem::state->node_mode){
switch(state->node_mode){
case 0:{
midi_note += wheel;
break;}
@@ -114,7 +112,7 @@ namespace VISEQ::GRAPH::NODES {
if(midi_velocity < 0 ) midi_velocity = 127;
if(midi_velocity > 127 ) midi_velocity = 0;
} else if(KEYS_DOWN.alt) {
switch(GraphItem::state->node_mode){
switch(state->node_mode){
case 0:{
float incr = (float)wheel * (KEYS_DOWN.shift ? 100.0f : KEYS_DOWN.ctrl ? 1000.0f : 10.0f);
midi_gate += incr;