summaryrefslogtreecommitdiff
path: root/scene/gui/graph_node.h
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2022-09-10 14:23:11 +0300
committerGitHub <noreply@github.com>2022-09-10 14:23:11 +0300
commit461037203cc0ec4f8a59422163b37e29e125d5fc (patch)
treefe82b0dc5855e6a7199a6705dbccdd8cea122e48 /scene/gui/graph_node.h
parent8899f1eec213620c421ba16c07cf1b3681c5a25d (diff)
parent29c8504dd92fc746cea1109cff6ffa2e5616ba48 (diff)
Merge pull request #65574 from YuriSizov/graphedit-slot-port-conundrum
Diffstat (limited to 'scene/gui/graph_node.h')
-rw-r--r--scene/gui/graph_node.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index 9c8f926403..e66b0cfc20 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -78,15 +78,17 @@ private:
Vector<int> cache_y;
- struct ConnCache {
- Vector2 pos;
+ struct PortCache {
+ Vector2 position;
+ int height;
+
+ int slot_idx;
int type = 0;
Color color;
- int height;
};
- Vector<ConnCache> conn_input_cache;
- Vector<ConnCache> conn_output_cache;
+ Vector<PortCache> left_port_cache;
+ Vector<PortCache> right_port_cache;
HashMap<int, Slot> slot_info;
@@ -165,16 +167,18 @@ public:
bool is_close_button_visible() const;
int get_connection_input_count();
- int get_connection_input_height(int p_idx);
- Vector2 get_connection_input_position(int p_idx);
- int get_connection_input_type(int p_idx);
- Color get_connection_input_color(int p_idx);
+ int get_connection_input_height(int p_port);
+ Vector2 get_connection_input_position(int p_port);
+ int get_connection_input_type(int p_port);
+ Color get_connection_input_color(int p_port);
+ int get_connection_input_slot(int p_port);
int get_connection_output_count();
- int get_connection_output_height(int p_idx);
- Vector2 get_connection_output_position(int p_idx);
- int get_connection_output_type(int p_idx);
- Color get_connection_output_color(int p_idx);
+ int get_connection_output_height(int p_port);
+ Vector2 get_connection_output_position(int p_port);
+ int get_connection_output_type(int p_port);
+ Color get_connection_output_color(int p_port);
+ int get_connection_output_slot(int p_port);
void set_overlay(Overlay p_overlay);
Overlay get_overlay() const;