Jump to content

GUI ScrollPanel


Recommended Posts

A new ScrollPanel GUI component is going to be born with the following capabilities:

  1. Scroll Orientation Support:
    • Allows scrolling in horizontal, vertical, or both directions, providing flexibility for different use cases.
  2. Partial Object Rendering:
    • Supports partial rendering of objects that are only partially visible within the scroll boundaries, improving visual accuracy and performance.
  3. Boundary-Constrained Mouse Interaction:
    • Handles mouse events strictly within the panel's visible boundaries, preventing interaction with objects outside the scrollable area.
  4. Minimum Internal Size (min_width, min_height):
    • Introduces support for virtual space management, allowing the panel to maintain a minimum internal size independent of its actual on-screen dimensions.
    • Even when the panel is resized, this ensures that the content respects a defined virtual space (with min_width and min_height), effectively simulating a larger internal canvas.
    • This is particularly useful for large content or scenarios where a more extensive scrollable area is required than the current visible panel.

Here is the showcase

 

Pull request: https://gitea.wildfiregames.com/0ad/0ad/pulls/7118

Please give me feedback to keep improving GUI Components.

  • Like 7
  • Thanks 2
Link to comment
Share on other sites

Hello, mind if you can help me to get all current ui that would need this component, please with images, keep in mind to use the minimal screen we supported.

For now im working on Structure tech/unit tree info.

Maybe summary screens?.

 

Thx in advance

  • Like 1
Link to comment
Share on other sites

I think this can be used on all UI pages, really. Handling UI scaling on lower screen resolutions is such a hassle and this is a very elegant solution to it.

I will also use scrollpanels for the encyclopedia page as soon as the PR gets merged.

Great work.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...