Some progress on selecting, hovering but still buggy and not a good design really.
This commit is contained in:
@@ -305,20 +305,6 @@ namespace VISEQ::GRAPH {
|
||||
|
||||
void drawNodes(Vec2Df mouse_pos, Camera2D camera){
|
||||
for(auto n : nodes){
|
||||
if(CheckCollisionPointRec(n->position, state->selection)) {
|
||||
n->in_selection_rect = true;
|
||||
} else {
|
||||
n->in_selection_rect = false;
|
||||
}
|
||||
if(state->istate == APP::InteractionState::DRAW_SELECTION && state->mouse_left.released){
|
||||
if(CheckCollisionPointRec(n->position, state->selection)) {
|
||||
n->selected = true;
|
||||
n->in_selection_rect = false;
|
||||
} else {
|
||||
if(!state->keys_down.shift) n->selected = false;
|
||||
}
|
||||
state->selection = (Rectangle){0,0,0,0};
|
||||
}
|
||||
n->update();
|
||||
if(n->picked_up) drawNeighborLines(n, mouse_pos, camera);
|
||||
n->draw(mouse_pos, camera);
|
||||
|
||||
Reference in New Issue
Block a user