Drag selection working again - not much progress
This commit is contained in:
+2
-3
@@ -33,8 +33,7 @@ namespace VISEQ::APP::CANVAS {
|
||||
EndMode2D();
|
||||
}
|
||||
|
||||
void select_rect(){
|
||||
|
||||
void selectNodes(){
|
||||
if(state->mouse_left.clicked){
|
||||
state->selection = (Rectangle){0,0,0,0};
|
||||
select_start = state->screen_mouse;
|
||||
@@ -55,7 +54,7 @@ namespace VISEQ::APP::CANVAS {
|
||||
virtual void update() override {
|
||||
camera_delta = state->mouse_delta * (-1.0f/camera.zoom);
|
||||
if(hovering()) drag();
|
||||
if(state->istate == InteractionState::HOVER_CANVAS || state->istate == InteractionState::DRAW_SELECTION) select_rect();
|
||||
if(state->istate == InteractionState::HOVER_CANVAS || state->istate == InteractionState::DRAW_SELECTION) selectNodes();
|
||||
|
||||
float wheel = GetMouseWheelMove();
|
||||
if(wheel != 0){
|
||||
|
||||
Reference in New Issue
Block a user