Files
viseq/src/graph-item.h
T

36 lines
588 B
C++
Raw Normal View History

2024-10-30 14:55:24 +01:00
#pragma once
#include "raylib.h"
2024-10-30 14:55:24 +01:00
#include "datatypes.h"
#include <memory>
2024-10-30 14:55:24 +01:00
#include <vector>
2024-11-03 03:48:49 +01:00
namespace VISEQ::GRAPH {
class GraphItem{
2024-10-30 14:55:24 +01:00
2024-11-03 03:48:49 +01:00
public:
2024-11-05 00:51:25 +01:00
GraphItem() {newId(-1);}
GraphItem(const GraphItem& G) {
2024-11-05 00:51:25 +01:00
newId(-1);
graphItemType = G.graphItemType;
}
2024-11-03 03:48:49 +01:00
GraphItemType graphItemType;
int id = 0;
2024-11-05 00:51:25 +01:00
void newId(int start){
static int _id;
2024-11-05 00:51:25 +01:00
if(start > -1) _id = start;
id = _id;
_id++;
}
2024-11-03 03:48:49 +01:00
virtual void draw(Vec2Df mouse, Camera2D cam) {};
virtual GraphItemType getType() {return graphItemType;}
virtual ~GraphItem() = default;
2024-11-03 03:48:49 +01:00
};
2024-11-03 03:48:49 +01:00
}