Skip to content

Add StickyContainer#114863

Open
dugramen wants to merge 1 commit into
godotengine:masterfrom
dugramen:sitcky-scroll-stack
Open

Add StickyContainer#114863
dugramen wants to merge 1 commit into
godotengine:masterfrom
dugramen:sitcky-scroll-stack

Conversation

@dugramen
Copy link
Copy Markdown

closes godotengine/godot-proposals#5599

2026-01-11.14-01-58.mp4

Adds StickyContainer. It allows sticking any children of StickyContainer to the bounds of the nearest ScrollContainer.

At runtime (not in the edited scene), when a child is added to StickyContainer, it gets reparented to the ScrollContainer, so that the controls appear above the normal scroll content and receive input first. The StickyContainer's rect is used to track where the sticky nodes would normally be, and then ScrollContainer handles actually positioning them, keeping it within its global rect

There's an optional bounding_container, which is a NodePath. If its set, the sticky control will also be limited to the bounds of that control, enabling those section headers.

Finally there's an optional stacked property, enabling the last example in the video.

There's a signal for "status_changed", telling when a sticky node is stuck, unstuck but out of view, or unstuck but in view. I'm not sure about these states, but it was what the linked proposal was mainly requesting

@dugramen dugramen requested review from a team as code owners January 11, 2026 19:19
@dugramen dugramen force-pushed the sitcky-scroll-stack branch from 100a431 to 32ba170 Compare January 11, 2026 21:10
@KoBeWi KoBeWi added this to the 4.x milestone Jan 11, 2026
@dugramen dugramen force-pushed the sitcky-scroll-stack branch from 32ba170 to b617540 Compare January 11, 2026 22:46
Comment thread scene/gui/sticky_container.h Outdated
Comment thread scene/gui/sticky_container.h Outdated
Comment thread scene/gui/sticky_container.h Outdated
Comment thread scene/gui/sticky_container.h Outdated
Comment thread scene/gui/sticky_container.cpp
Comment thread scene/gui/scroll_container.cpp Outdated
Comment thread scene/gui/container.cpp Outdated
Comment thread scene/gui/scroll_container.cpp Outdated
Comment thread doc/classes/StickyContainer.xml Outdated
Comment thread doc/classes/StickyContainer.xml Outdated
@dugramen dugramen force-pushed the sitcky-scroll-stack branch from b617540 to 4e8ca4d Compare January 12, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a SectionContainer with sticky header that signals section visibility to allow queing and freeing of resources

4 participants