+2 votes

create a menu that expands and collapses child nodes

Godot version 3.2
in Engine by (185 points)

This sounds a lot like a Tree control. If that's not what you're after, then maybe you want to provide a more detailed description?

What do you mean by Tree control, I want to want to collapse the menu and then expand it vertically when I click on it in the control

1 Answer

0 votes

My response above contains a link to the Tree documentation. Though, for a visual reference, that's the control that's used in the Godot editor for the Scene Tree and the FileSystem panel.

It provides the expand / collapse feature that you mention, though depending on your requirements, it may not be what you need...

by (10,916 points)

I copy the example code and it doesn't work, as it would with a label

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.