global mouse moved to state and removed some GetMousePosition()s.
This commit is contained in:
+1
-5
@@ -19,12 +19,10 @@ namespace VISEQ::BASE {
|
||||
}
|
||||
|
||||
virtual bool hovering() override {
|
||||
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
|
||||
return CheckCollisionPointCircle(mp, position, 5);
|
||||
return CheckCollisionPointCircle(state->screen_mouse, position, 5);
|
||||
}
|
||||
|
||||
virtual void drag() override {
|
||||
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
|
||||
DrawLineV(position, state->mod_mouse, (Color){229, 181, 103, 255});
|
||||
}
|
||||
|
||||
@@ -39,8 +37,6 @@ namespace VISEQ::BASE {
|
||||
}
|
||||
|
||||
virtual void connect() {
|
||||
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
|
||||
|
||||
if(picked_up){
|
||||
for(auto c : connectables){
|
||||
if(c.get() != this && c->hovering()) {
|
||||
|
||||
Reference in New Issue
Block a user