|
@ -64,8 +64,10 @@ public: |
|
|
class NodeEditor { |
|
|
class NodeEditor { |
|
|
public: |
|
|
public: |
|
|
NodeEditor() { |
|
|
NodeEditor() { |
|
|
nodeList.emplace_back("hi", Rect(10, 10, 60, 60)); |
|
|
|
|
|
nodeList.emplace_back("hi2", Rect(10, 80, 60, 60)); |
|
|
|
|
|
|
|
|
nodeList.emplace_back("hi", Rect(10, 10, 60, 60), 3, 1); |
|
|
|
|
|
nodeList.emplace_back("hi2", Rect(80, 10, 60, 60), 1, 1); |
|
|
|
|
|
|
|
|
|
|
|
edgeList.emplace_back(&nodeList[0], &nodeList[1], 0, 0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void draw_window(const char *title, bool *opened) { |
|
|
void draw_window(const char *title, bool *opened) { |
|
@ -144,6 +146,7 @@ public: |
|
|
|
|
|
|
|
|
private: |
|
|
private: |
|
|
std::vector<GuiNode> nodeList; |
|
|
std::vector<GuiNode> nodeList; |
|
|
|
|
|
std::vector<GuiEdge> edgeList; |
|
|
|
|
|
|
|
|
ImVec2 scrolling = ImVec2(0.0f, 0.0f); |
|
|
ImVec2 scrolling = ImVec2(0.0f, 0.0f); |
|
|
bool show_grid = true; |
|
|
bool show_grid = true; |
|
|