summaryrefslogtreecommitdiffstats
path: root/scene/gui/graph_node.h
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-09-14 15:21:45 +0200
committerYuri Sizov <yuris@humnom.net>2023-09-14 15:21:45 +0200
commit56e54b49b65c0feb4368ec88a89c2d40af1b4ad3 (patch)
tree3089a9a0bbdd637b2bc816fc5d1f46ec6608f41b /scene/gui/graph_node.h
parentded139384e5a478a3f942a463f341b53a3f6fffd (diff)
parentfe000277eaea77bb19ca0c5dae650ab4f76ccef0 (diff)
downloadredot-engine-56e54b49b65c0feb4368ec88a89c2d40af1b4ad3.tar.gz
Merge pull request #81551 from YuriSizov/gui-cache-all-the-theme
Bind remaining theme properties to their respective classes
Diffstat (limited to 'scene/gui/graph_node.h')
-rw-r--r--scene/gui/graph_node.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index 1178421819..04ca9e7cb4 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -38,6 +38,8 @@ class HBoxContainer;
class GraphNode : public GraphElement {
GDCLASS(GraphNode, GraphElement);
+ friend class GraphEdit;
+
struct Slot {
bool enable_left = false;
int type_left = 0;
@@ -74,9 +76,23 @@ class GraphNode : public GraphElement {
Vector<PortCache> right_port_cache;
HashMap<int, Slot> slot_table;
-
Vector<int> slot_y_cache;
+ struct ThemeCache {
+ Ref<StyleBox> panel;
+ Ref<StyleBox> panel_selected;
+ Ref<StyleBox> titlebar;
+ Ref<StyleBox> titlebar_selected;
+ Ref<StyleBox> slot;
+
+ int separation = 0;
+ int port_h_offset = 0;
+
+ Ref<Texture2D> port;
+ Ref<Texture2D> resizer;
+ Color resizer_color;
+ } theme_cache;
+
bool port_pos_dirty = true;
void _port_pos_update();