+1 vote

I'm most likely going to use Godot's built-in containers but how could I approach making (in gdscript) my own/custom ones? Where to start? Is it possible not using container related nodes?

From what I understand, container is an area that shows only part of a different object which contains more stuff. Then you can scroll it, resize it and so on...

My current idea of how I see it, is to check if object is visible inside the container area but right from the start I see problems that could occur from containing bigger objects. I tried to do some research but I'm not even sure what to look for.

Thank you for any hints, resources and explanations.

in Engine by (39 points)

Have you looked at the API for the Container and Control classes? What do you want to do with the custom containers?

I basically want to replicate the functionality of container nodes without using container nodes. It's more of "how does it work" task than something I really really need. I haven't read API too much. Do not consider me a serious programmer.

Yeah, as I see it, you can add various Control nodes to a base Container, and it will move them, resize them, or just contain them. It basically fits them into a rectangle that is set via the other settings in the user interface, or could even be set programmatically.

Please log in or register to answer this question.

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.