Merge branch 'refactor-orbit-ui' of ssh://code.sebastiankujas.com:20002/sebastian/viseq into refactor-orbit-ui
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "clipboard.h"
|
||||
#include "connector.h"
|
||||
#include "datatypes.h"
|
||||
#include "interaction-event.h"
|
||||
#include "node.h"
|
||||
#include "raylib.h"
|
||||
#include "state.h"
|
||||
@@ -134,12 +133,13 @@ namespace VISEQ::INTERACTION{
|
||||
bool connect_once = false;
|
||||
|
||||
state->mouse_z = canvas->z_index;
|
||||
std::cout << state->event_queue.size() << " ";
|
||||
|
||||
for(auto e : APP::event_queue){
|
||||
for(auto e : state->event_queue){
|
||||
if(!connect_once && e.action == APP::Interaction::CONNECT){
|
||||
APP::InteractionEvent partner;
|
||||
bool found = false;
|
||||
for(auto ei : APP::event_queue){
|
||||
for(auto ei : state->event_queue){
|
||||
if(ei.action == APP::Interaction::HOVER && ei.item->getType() == GraphItemType::CONNECTOR) {
|
||||
std::cout << "YEAH" << std::endl;
|
||||
partner = ei;
|
||||
@@ -167,8 +167,12 @@ namespace VISEQ::INTERACTION{
|
||||
}
|
||||
}
|
||||
|
||||
while(APP::event_queue.size() > 0 && !exit){
|
||||
auto e = APP::event_queue.front();
|
||||
while(state->event_queue.size() > 0 && !exit){
|
||||
auto e = state->event_queue.front();
|
||||
std::cout << e.action;
|
||||
if(e.action == APP::Interaction::CLICK){
|
||||
gm->addToSelection();
|
||||
}
|
||||
if(e.action == APP::Interaction::RIGHTCLICK){
|
||||
gm->addToSelection();
|
||||
state->context_menu = !state->context_menu;
|
||||
@@ -249,8 +253,8 @@ namespace VISEQ::INTERACTION{
|
||||
}
|
||||
}
|
||||
|
||||
APP::event_queue.pop_front();
|
||||
state->event_queue.pop_front();
|
||||
}
|
||||
APP::event_queue.clear();
|
||||
state->event_queue.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user