summaryrefslogtreecommitdiffstats
path: root/scene/2d/canvas_modulate.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/canvas_modulate.h')
-rw-r--r--scene/2d/canvas_modulate.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/2d/canvas_modulate.h b/scene/2d/canvas_modulate.h
index 3b11cf71f1..08ded52e23 100644
--- a/scene/2d/canvas_modulate.h
+++ b/scene/2d/canvas_modulate.h
@@ -38,6 +38,14 @@ class CanvasModulate : public Node2D {
Color color = Color(1, 1, 1, 1);
+ // CanvasModulate is in canvas-specific modulate group when both in canvas and visible in tree.
+ // Exactly one CanvasModulate in each such non-empty group is active.
+ bool is_in_canvas = false;
+ bool was_visible_in_tree = false; // Relevant only when in canvas.
+ bool is_active = false;
+
+ void _on_in_canvas_visibility_changed(bool p_new_visibility);
+
protected:
void _notification(int p_what);
static void _bind_methods();