Skip to content

Use GuiScrollContainer on CustomShipFunctions lists#2784

Draft
oznogon wants to merge 4 commits intodaid:masterfrom
oznogon:guiscrollcontainer-customshipfunctions
Draft

Use GuiScrollContainer on CustomShipFunctions lists#2784
oznogon wants to merge 4 commits intodaid:masterfrom
oznogon:guiscrollcontainer-customshipfunctions

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Mar 12, 2026

This draft demonstrates usage of #2775 and stacks on that PR. 2775 requires daid/SeriousProton#300, and CI will fail without SP 300.

Reparent CustomShipFunctions to GuiScrollContainer and tailor the
element height to the default UI on most crew screens.

Examples:

Screenshot_20260312_030439 Screenshot_20260312_030551

@oznogon oznogon changed the title Guiscrollcontainer customshipfunctions Use GuiScrollContainer on CustomShipFunctions lists Mar 12, 2026
oznogon and others added 4 commits March 13, 2026 18:28
Add GuiScrollContainer, a subclass of GuiContainer to support
arbitrary and nested scrolling elements. This relies on changes in
SeriousProton to implement GL_SCISSOR_TEST in RenderTarget.

Child element positions and click/hover handling are translated
relative to the scroll position. These containers can be nested, and
mousewheel and scroll events are passed down the tree.

This container element can also replace the bespoke scrolling behaviors
in other element types, such as GuiListbox.

- Pass focus, text input through GuiScrollContainer.
- Position nested GuiSelector popups relative to scroll translation
- Add scrollToOffset() function to allow other elements to control
  scroll position.
- Handle layout padding in scissor rects.
- Hide scrollbar if ScrollMode is None.
- Use pragma once guard
- Internal consistency in formatting
- Expand terse varnames
- Remove redundant public/protected sections in the header
Reparent CustomShipFunctions to GuiScrollContainer and tailor the
element height to the default UI on most crew screens.
@oznogon oznogon force-pushed the guiscrollcontainer-customshipfunctions branch from fa8df44 to cd5ba46 Compare March 14, 2026 04:21
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.

1 participant