Dragging and selecting works. Dragging the selection not yet.

This commit is contained in:
Sebastian
2024-11-25 00:53:10 +01:00
parent f04838bffa
commit 9c0aac8618
9 changed files with 76 additions and 53 deletions
+12 -2
View File
@@ -1,6 +1,7 @@
#pragma once
#include "interaction-event.h"
#include "nlohmann/json.hpp"
#include "raylib.h"
#include "vmath.h"
#include <memory>
@@ -78,12 +79,21 @@ namespace VISEQ::APP{
Vec2Df mouse_delta;
Vec2Df hover_position;
Vec2Df selection_origin;
void pushEvent(InteractionEvent e){
event_queue.push(e);
event_queue.push_back(e);
}
InteractionEvent pullEvent(){
if(!event_queue.empty()){
InteractionEvent e = event_queue.front();
event_queue.pop_front();
return e;
}
return {nullptr, Interaction::NONE};
}
void update(Camera2D camera){
if(istate != old_istate) std::cout << state_string[istate] << std::endl;