Skip to content

Add horizontal scrolling and support for nesting ScrollingPanes#72

Merged
flibber-hk merged 11 commits into
silksong-modding:mainfrom
kaycodes13:feature/nested-and-horizontal-scrolling
Apr 29, 2026
Merged

Add horizontal scrolling and support for nesting ScrollingPanes#72
flibber-hk merged 11 commits into
silksong-modding:mainfrom
kaycodes13:feature/nested-and-horizontal-scrolling

Conversation

@kaycodes13
Copy link
Copy Markdown
Contributor

@kaycodes13 kaycodes13 commented Apr 27, 2026

Summary of Changes

This adds:

  • Support for horizontal scrolling
  • Support for nesting ScrollingPanes within other ScrollingPanes

(no version bump due to 4 open PRs at time of writing)

Checklist

  • No change is too small for a release, so pick one:
    • I have updated the package version following semantic versioning
    • There is another change actively WIP that will update the version
    • This PR does not update user-facing code/config
    • I'm not sure how to set the version and would like the reviewer's help

Some of those prefabs thought they were 1920 units wide. It was causing problems.
ScrollTo() calls now propogate up all nested scroll panes. The first ScrollToIfOnMenuShow() call prevents any other scroll pane under the same MenuScreen hierarchy from firing it again.
@kaycodes13
Copy link
Copy Markdown
Contributor Author

Before I mark this as ready for review, I was hoping I could get a bit of help with an odd navigation order issue.

On the first page of the "Scrolling Pane Tests" menu I built, The content is structured:

GridGroup (2 columns)
    ScrollingPane
        VerticalGroup
            TextButton x 15
    ScrollingPane
        VerticalGroup
            TextButton x 15

For the most part this is working as expected, except for some reason, Navigating left and right between the two scroll panes always focuses the middle button in the group - button 7 - regardless of which button you're navigating from or what the state of either scroll pane is.

I don't have a good grasp of how the navigation is set up, but that behaviour doesn't seem correct to me. I'd expect to either navigate to what is visually the closest selectable to the side of the one I was on is, or maybe to go to the top of the next pane over.

Would anyone mind taking a look and trying to sort out what's going on there and if it's correct or not? 😅

@kaycodes13 kaycodes13 marked this pull request as ready for review April 27, 2026 23:07
@kaycodes13
Copy link
Copy Markdown
Contributor Author

After discussing with Flibber, it seems like that issue is related to the VerticalGroup code, not the ScrollingPane, so this is good for review now.

Comment thread Silksong.ModMenu/Elements/ScrollingPane.cs Outdated
Comment thread Silksong.ModMenu/Elements/ScrollingPane.cs
Comment thread Silksong.ModMenu/Elements/ScrollingPane.cs Outdated
ScrollAxes is now a flags enum, EnumerateDescendants Predicate is now a Func, and .RectTransform extension is used in place of casts/etc.
Comment thread Silksong.ModMenu/Elements/ScrollingPane.cs
Comment thread Silksong.ModMenu/Internal/MenuPrefabs.cs
@flibber-hk flibber-hk merged commit f8cbe81 into silksong-modding:main Apr 29, 2026
4 checks passed
@flibber-hk
Copy link
Copy Markdown
Member

As with the other PR, feel free to make some noise in Discord if you want a release before the other extant PRs are gotten to

This was referenced May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants