ControlNodes init. Feels like a good idea!

This commit is contained in:
Sebastian
2024-12-13 01:15:55 +01:00
parent 7f2d16932f
commit b2ed35a704
3 changed files with 48 additions and 1 deletions
+43
View File
@@ -0,0 +1,43 @@
#pragma once
#include "node.h"
namespace VISEQ::GRAPH::NODES{
class ControlNode: public Node{
public:
ControlNode(){}
float radius = 6;
NodeType nodeType = NodeType::CONTROLNODE;
Vec2Df center;
std::shared_ptr<ControlNode> getPtr(){
return std::static_pointer_cast<ControlNode>(shared_from_this());
}
virtual GRAPH::GraphItemType getType() override {
return GraphItemType::NODE;
}
virtual NodeType getNodeType() const override {return nodeType;}
virtual bool hovering() override {
return CheckCollisionPointCircle(SCREEN_MOUSE, position, radius);
}
virtual void update() override {
Node::update();
}
virtual void draw() override {
DrawCircleV(position, radius, VS_COLOR_SUN);
}
virtual bool select() override {
return false;
}
};
}