Add functionality to draw nodes with user-defined inputs count
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "ui.h"
|
||||
|
||||
#define MAX_NODES 1024
|
||||
#define IO_INPUT_COUNT 0
|
||||
#define OP_INPUT_COUNT 2
|
||||
|
||||
typedef i32 (*node_func)(i32 a, i32 b);
|
||||
typedef enum node_type node_type;
|
||||
@@ -28,6 +30,7 @@ struct node {
|
||||
ui_elem_colours colours;
|
||||
node_type type;
|
||||
node_data data;
|
||||
u64 inputs;
|
||||
};
|
||||
|
||||
#endif // !NODES_H
|
||||
|
||||
@@ -39,8 +39,9 @@ struct ui_elem_colours {
|
||||
|
||||
typedef struct ui_node_elem ui_node_elem;
|
||||
struct ui_node_elem {
|
||||
line noodle;
|
||||
rect rec;
|
||||
line *noodles;
|
||||
u64 inputs;
|
||||
};
|
||||
|
||||
struct ui_ctx {
|
||||
|
||||
Reference in New Issue
Block a user