copy/paste partially. z-index experiments, but not working yet.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "connectable.h"
|
||||
#include "graph-item.h"
|
||||
#include "raymath.h"
|
||||
#include "state.h"
|
||||
#include "vmath.h"
|
||||
|
||||
namespace VISEQ::GRAPH {
|
||||
@@ -24,6 +25,10 @@ namespace VISEQ::GRAPH {
|
||||
float orbit = 14.0f;
|
||||
Vec2Df center_position;
|
||||
|
||||
virtual bool hovering() override {
|
||||
return STATE != IState::DRAW_SELECTION && CheckCollisionPointCircle(SCREEN_MOUSE, position, radius);
|
||||
}
|
||||
|
||||
void setParent(std::shared_ptr<GraphItem> _parent){
|
||||
parent = _parent;
|
||||
}
|
||||
@@ -34,6 +39,10 @@ namespace VISEQ::GRAPH {
|
||||
if(partner) position = center_position - ((center_position - partner->position)).norm() * (radius + orbit);
|
||||
}
|
||||
|
||||
void update() override {
|
||||
BASE::Connectable::update();
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
float opacity = 150.0f - Clamp(position.dist(SCREEN_MOUSE), 0.0f, 150.0f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user