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

Fix always_on_top for sub-dialogs #1167

Merged

Conversation

Variable-ind
Copy link
Contributor

Fix Create Folder sub-dialog of Export > Browse being always behind (thus making it unusable).

This shall fix the problem on other locations as well. As long as they are included in the FileDialogs tag (in Main.tscn)

@Variable-ind Variable-ind marked this pull request as draft January 25, 2025 08:08
@Variable-ind
Copy link
Contributor Author

I noticed there are some other cases where the popups of option buttons get hidden behind the window if the window has always_on_top enabled. (like the LayoutFrom option button in ManageLayouts.tscn)

so i'm converting this to a draft and will modify this later to include those fixes as well

@Variable-ind
Copy link
Contributor Author

Variable-ind commented Feb 5, 2025

Okay, so i managed to fully fix it
(Some comments about the PR):

  • FixInternalDialogs is a dedicated group which only contains items which need correction (once they are corrected they are removed from the group).
  • FixInternalDialogs is a Global group instead of a Scene group.
    • This is to avoid the hassle of creating the same group again and again for each scene (Plus they can be change to scene groups later anyway, if the need arises).
    • This also make it easier to undo this PR if it gets fixed in Godot (i checked in Godot 4.4 but it wasn't fixed yet)
  • The code for correction is moved to the Dialog class because:
    • (Short version): It's a more general solution. Items with internal popups/windows can be placed in FixInternalDialogs group and the system automatically fixes them (even if their parent window is a Dialog class). This isn't (easily) possible if the code is moved anywhere else.
    • (Long version) Even if currently only Export and Save dialogs have this bug (i haven't seen it anyplace else, besides the now removed ManageLayouts.tscn), we may in the future encounter this in one of the Dialogs (like we did in the LayoutFrom OptionButton of ManageLayouts.tscn), And since Dialogs are not "immediately" part of the scene, we have to fix it's internal dialogs WHILE it's being added to tree.

Related stuff:
godotengine/godot#95096
godotengine/godot#92848

@Variable-ind Variable-ind marked this pull request as ready for review February 5, 2025 09:18
Copy link
Member

@OverloadedOrama OverloadedOrama left a comment

Choose a reason for hiding this comment

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

Thanks!

@OverloadedOrama OverloadedOrama merged commit 563edce into Orama-Interactive:master Feb 5, 2025
4 checks passed
@Variable-ind Variable-ind deleted the fix-sub-dialogs branch February 6, 2025 01:04
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