ControlNodes init. Feels like a good idea!
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user