Browse Source

node_editor.h: set up edgeList, emplace some test data

master
gradient 8 years ago
parent
commit
ee9352958f
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/gui/node_editor.h

+ 5
- 2
src/gui/node_editor.h View File

@ -64,8 +64,10 @@ public:
class NodeEditor {
public:
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) {
@ -144,6 +146,7 @@ public:
private:
std::vector<GuiNode> nodeList;
std::vector<GuiEdge> edgeList;
ImVec2 scrolling = ImVec2(0.0f, 0.0f);
bool show_grid = true;


Loading…
Cancel
Save