From 6d876baf60d624d65737583c4d88d5c86c6e12cc Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Sat, 30 Apr 2022 03:56:57 +0200 Subject: Improve the VisualShader/VisualScript editor UI --- scene/gui/graph_node.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scene/gui/graph_node.h') diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 7eb5f27cff..44f58533fc 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -54,6 +54,7 @@ private: Color color_right = Color(1, 1, 1, 1); Ref custom_slot_left; Ref custom_slot_right; + bool draw_stylebox = true; }; String title; @@ -115,7 +116,7 @@ protected: public: bool has_point(const Point2 &p_point) const override; - void set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref &p_custom_left = Ref(), const Ref &p_custom_right = Ref()); + void set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref &p_custom_left = Ref(), const Ref &p_custom_right = Ref(), bool p_draw_stylebox = true); void clear_slot(int p_idx); void clear_all_slots(); @@ -137,6 +138,9 @@ public: void set_slot_color_right(int p_idx, const Color &p_color_right); Color get_slot_color_right(int p_idx) const; + bool is_slot_draw_stylebox(int p_idx) const; + void set_slot_draw_stylebox(int p_idx, bool p_enable); + void set_title(const String &p_title); String get_title() const; @@ -185,7 +189,9 @@ public: virtual Vector get_allowed_size_flags_horizontal() const override; virtual Vector get_allowed_size_flags_vertical() const override; - bool is_resizing() const { return resizing; } + bool is_resizing() const { + return resizing; + } GraphNode(); }; -- cgit v1.2.3