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

Allow adding a custom side menu to EditorFileDialog #79313

Merged

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Jul 11, 2023

This PR adds a method to EditorFileDialog to add a custom side menu. You can specify a title text, which will be themed similarly to the rest of EditorFileDialog, and a Control node to be added below it.

I am planning to use this functionality to add export settings for GLTF. Here is a screenshot of this in action:

Screenshot 2023-07-11 at 3 22 20 PM

@aaronfranke aaronfranke added this to the 4.x milestone Jul 11, 2023
@aaronfranke aaronfranke requested a review from a team as a code owner July 11, 2023 06:37
@TokageItLab TokageItLab requested a review from a team July 23, 2023 12:37
@aaronfranke aaronfranke force-pushed the editor-file-dialog-side-menu branch 2 times, most recently from b7f8add to b821d43 Compare September 11, 2023 23:24
@aaronfranke
Copy link
Member Author

Updated the PR based on feedback, the side panel will now go all the way to the bottom, with the file type dropdown always under the list of files.

Screenshot 2023-09-11 at 6 00 22 PM

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Sep 26, 2023
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it, but code looks alright.

We may want to add a method to remove the sidebar as well, since it won't be enough to just remove the control from its parent. You need to remove the title as well, which is created implicitly. It's not impossible to work around, but hooking into the exact node tree structure would be less than ideal when we could just expose a clear_side_menu method that would handle everything or us.

@aaronfranke
Copy link
Member Author

Appearance with the HSplitContainer:

Screenshot 2023-09-26 at 1 59 44 PM

@akien-mga akien-mga merged commit 2dd1295 into godotengine:master Sep 26, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

3 participants