godotengine / godotengine/godot-docs
Create docs for creating a custom Control
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
There isn't much information on how to build custom UI Controls for Godot. The current section (see https://docs.godotengine.org/en/3.1/tutorials/gui/custom_gui_controls.html) gives very little practical info.
When building our own, we ended up trawling through Control.cpp to answer most of our questions.
Sizing is one of the most complicated aspects of custom controls to follow. You can't draw, layout, or make a container, without understanding control size.
As a starting point I feel the following should be documented:
- Where and when is the size set? (Normally by the container?)
- At what point is the size & layout available (e.g. it's not straight after calling `add_child`, and often not yet available in `_ready`)
- How do the different sizing methods work? E.g. the differences between the virtual method `_get_minimum_size`, `get_minimum_size`, `rect_min_size`, `rect_size`, and the `set_custom_minimum_size` setters.
- How does a custom container work?
Feel free to add more sticking points if you've worked with custom Controls.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.