Dragging and selecting works. Dragging the selection not yet.
This commit is contained in:
+3
-2
@@ -38,8 +38,9 @@ namespace VISEQ::BASE {
|
||||
}
|
||||
|
||||
virtual void drag() override {
|
||||
state->selection_origin = position;
|
||||
if(KEYS_PRESSED.ctrl){
|
||||
selection_offset = position - state->hover_position;
|
||||
selection_offset = position - state->selection_origin;
|
||||
}
|
||||
if(KEYS_DOWN.ctrl){
|
||||
position = MOD_MOUSE + selection_offset;
|
||||
@@ -53,7 +54,7 @@ namespace VISEQ::BASE {
|
||||
}
|
||||
|
||||
virtual void select() override {
|
||||
if(STATE == IState::DRAW_SELECTION) in_selection_rect = CheckCollisionPointRec(position, state->selection);
|
||||
in_selection_rect = CheckCollisionPointRec(position, state->selection);
|
||||
if(MOUSE_LEFT.released) selected = (KEYS_DOWN.shift && selected) || in_selection_rect;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user