Some progress on selecting, hovering but still buggy and not a good design really.

This commit is contained in:
Sebastian
2024-11-17 02:40:31 +01:00
parent 55926a5021
commit e9633ff19d
10 changed files with 99 additions and 37 deletions
-14
View File
@@ -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);