[go: up one dir, main page]

Skip to content
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

Ability to access Response from separator line created by SidePanel and TopBottomPanel #5272

Open
mfrench1989 opened this issue Oct 16, 2024 · 2 comments
Labels
egui feature New feature or request

Comments

@mfrench1989
Copy link

Taking an example from ScrollArea, on show functions the panel could return something more like:

pub struct PanelOutput<R> { pub inner: R, pub response: Response, pub separator: Response, }

This would allow developers to have better control over side, top, and bottom panels.

Personally I'd love it for the following use cases:

  • double middle click interaction on separator to restore panel to some default size.
  • track panel size as a ratio of available size based on drag_released on the separator Response. This way the ratio isn't needed to be updated every frame but only on key event frames.
  • create new panels on interaction with the separator instead of requiring other buttons to be available.
@emilk
Copy link
Owner
emilk commented Oct 23, 2024

Makes sense - you wanna make a PR?

@emilk emilk added egui feature New feature or request labels Oct 23, 2024
@mfrench1989
Copy link
Author

@emilk Sure, I can make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants