-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FoldableContainer Node #87559
Add FoldableContainer Node #87559
Conversation
202ceca
to
128a71e
Compare
I have tried to override the theme stylebox with a null value for |
This needs a proposal. |
Yes, but it's still a work in progress since I'm learning more about |
Well, we might reject the proposal because a foldable container can be easily done with a script, for example. So I would rather you not wasted your time unless you know this is desired. Remember, proposal comes before a PR. |
it will have a limitation with theming, this is why i have started it, i do have the same Container written in gdscript, and to customize it you need to create a custom_type, and if the project doesn't have a project_theme in project setting it will be hard to find the theme resource to add the custom_type to it, also you will have to keep the theme styleboxes, constants, colors, fonts as variables, and without a theme changing a stylebox property such as color it will not load since they don't have signals to emit to call queue_redraw() to redraw the styleboxes. |
Pretty sure you can use |
0f13622
to
4b6ad34
Compare
880bc07
to
5d45726
Compare
5d45726
to
b2e37af
Compare
If you could roughly fill in the documentation it would be heavily appreciated. Since you are the one that developed the Node in the first place, it should be easier for you to document and note down any additional quirk, as well. |
scene/gui/foldable_container.cpp
Outdated
ClassDB::bind_method(D_METHOD("set_text_direction", "text_direction"), &FoldableContainer::set_text_direction); | ||
ClassDB::bind_method(D_METHOD("get_text_direction"), &FoldableContainer::get_text_direction); | ||
|
||
ADD_SIGNAL(MethodInfo("expanded", PropertyInfo(Variant::BOOL, "is_expanded"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't name the signal and the property the same
Edit: and also expanded
is IMO a non-correct name as it happens when both collapsed and expanded, so something else like expansion_changed
might be better, or folding_changed
I'd prefer flipping the condition though and call the property folded
and have it be false by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I also was wondering about that error. Thank you all.
b5de14e
to
c9d2463
Compare
c9d2463
to
4b6ad34
Compare
Sorry about the noise again, sometimes I forget to commit the changes before doing a force push. |
4f668a0
to
7febba1
Compare
Bugsquad edit: closes godotengine/godot-proposals#8974
A Container similar to EditorInspector Sections!
FoldableContainer.mp4
WIP!
1- Generate class docs.
2- Allow RTL text orientation.3- Allow text translation.4- Add font outlines.5- Add more advanced text styling [clipping text and fill alignment] to optionally respect the title width when text changes, similar toButton
text behavior.