Dragging and selecting works. Dragging the selection not yet.
This commit is contained in:
+9
-3
@@ -3,8 +3,10 @@
|
||||
#include "clipboard.h"
|
||||
#include "datatypes.h"
|
||||
#include "graph-manager.h"
|
||||
#include "interaction-event.h"
|
||||
#include "midi-node.h"
|
||||
#include "mouse.h"
|
||||
#include "moveable.h"
|
||||
#include "node.h"
|
||||
#include "raylib.h"
|
||||
#include "signal-manager.h"
|
||||
@@ -61,16 +63,18 @@ namespace VISEQ::APP {
|
||||
auto e = event_queue.front();
|
||||
std::cout << e.action << " " << e.item->z_index << std::endl;
|
||||
|
||||
if(e.item->getType() == GraphItemType::NODE || e.item->getType() == GraphItemType::CONNECTOR) {
|
||||
if(e.item->getType() == GraphItemType::NODE || e.item->getType() == GraphItemType::CONNECTOR || e.item->getType() == GraphItemType::CANVAS) {
|
||||
switch(e.action){
|
||||
case VISEQ::APP::Interaction::PICKUP:
|
||||
{
|
||||
e.item->pickUp();
|
||||
goto exit_loop;
|
||||
break;
|
||||
}
|
||||
case VISEQ::APP::Interaction::DRAG:
|
||||
{
|
||||
e.item->drag();
|
||||
goto exit_loop;
|
||||
break;
|
||||
}
|
||||
case VISEQ::APP::Interaction::PUTDOWN:
|
||||
@@ -78,11 +82,13 @@ namespace VISEQ::APP {
|
||||
e.item->putDown();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
event_queue.pop();
|
||||
event_queue.pop_front();
|
||||
}
|
||||
exit_loop:
|
||||
event_queue.clear();
|
||||
}
|
||||
|
||||
void update(){
|
||||
|
||||
Reference in New Issue
Block a user