Dragging and selecting works. Dragging the selection not yet.
This commit is contained in:
+12
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user