| 3011 | namespace |
| 3012 | { |
| 3013 | void NodeLineHandler(ImNodesEditorContext& editor, const char* const line) |
| 3014 | { |
| 3015 | int id; |
| 3016 | int x, y; |
| 3017 | if (sscanf(line, "[node.%i", &id) == 1) |
| 3018 | { |
| 3019 | const int node_idx = ObjectPoolFindOrCreateIndex(editor.Nodes, id); |
| 3020 | GImNodes->CurrentNodeIdx = node_idx; |
| 3021 | ImNodeData& node = editor.Nodes.Pool[node_idx]; |
| 3022 | node.Id = id; |
| 3023 | } |
| 3024 | else if (sscanf(line, "origin=%i,%i", &x, &y) == 2) |
| 3025 | { |
| 3026 | ImNodeData& node = editor.Nodes.Pool[GImNodes->CurrentNodeIdx]; |
| 3027 | node.Origin = ImVec2((float)x, (float)y); |
| 3028 | } |
| 3029 | } |
| 3030 | |
| 3031 | void EditorLineHandler(ImNodesEditorContext& editor, const char* const line) |
| 3032 | { |
nothing calls this directly
no test coverage detected