-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move to new Window #4
Comments
Hmm, that's a nice feature to have, but if it would only be supported on Godot 4.0+, breaking changes to scripts are needed, like Does in-app floating windows work for you? I know it's not the same, but it is a nice feature DockableContainer could have and would still work on Godot 3. |
I would like to use multiple screens. in-app floating windows are also a great feature to have but can't solve my "problem". |
Feel free to implement Godot 4.0 support, but this will not be in the main branch until 4.0 is widely used. Just out of curiosity, are you using Godot 4.0 yet? |
Only for testing and for my project ideas that need multiple windows. (And there only the first tests, because there is no documentation.) |
In the video you can see what I thought with multiple windows and why I think it fits very well in your addon. 2021-06-18.20-37-47.mp4 |
Yeah, I also think this would be a really awesome addition! |
I am trying to implement this, but I have not found where the dragged container is stored. Can you tell me? |
The child Control objects are maintained as direct children of the DockableContainer object, only their rectangles and visibility are changed. Whenever a DockableContainer's layout is sorted again, what happens is that DockablePanels, which are TabContainers, are created for tracking the Controls that are tabbed there. So the flow of the positioning is:
Now, to make floating windows, we'd need a way in the Layout to mark Controls as floating windows and not store them in any of the panels. |
Thank you for your explanation. I understand it better now.
I haven't looked at this piece of code yet, but maybe the checkbox-hide functionality can be used for this. Due to this bug, we are currently unable to drag the container out of the main window to create a new window. :( (godotengine/godot#53170) |
No problem! I'm really sorry about the delay, things have been busy lately.
Not exactly, but it should be something just like it. Just like there is the _hidden_tabs Dictionary, there could be a About dragging to create the new window, maybe the best is doing like some apps do and detach the window if you drag it to the center of a tab. Something like that (imagine this rectangle is the panel and you're dragging another tab inside it): The DragNDropPanel script is resposible for drawing the drop preview and finding which margin will be split, you could change it to handle the panels' center. DockableContainer's _drop_data_fw method is where the layout is actually changed after dropping a tab inside another panel. |
I have prepared the central selection (hiding and floating isn't implemented yet):
2022-04-17.22-58-43.mp4 |
I have created the floating windows. Sadly, the new Godot 4.0 code contains some bugs. (Ghost tabs - disappear when clicked or are not clickable) for example:
The bugs appeared before I coded the new window function, so the floating windows aren't the cause for this. I started with my current main branch (https://github.com/Gamemap/godot-dockable-container) with godot 4.0 alpha 2. Here is a video showing the floating windows and the bugs: 2022-04-18.18-04-54.mp4 |
I don't know if it will be 100% clear the window is going to be detached, but it looks pretty nice to me! =D Can the detached windows be docked again inside a panel? As for these bugs regarding tabs, they seem related to the handling of the Layout internal to DockableContainer. Maybe the tabs are not being removed from the |
Currently only by closing the separate window with the Quit button. |
I reproduced the errors (now only 4). Error 2 and 4 are at line 60 (layout_panel.gd) Error 3 is at line 81 (layout_panel.gd) |
Today I tried the addon with Godot alpha 9 and I think the bugs were fixed by Godot developers (of course there are some smaller new ones). I think it would be better to wait until Godot 4.0 goes into beta to continue this.
Original Site (in german): https://wiki-de.dmxcontrol-projects.org/index.php?title=Panel-Konzept_DMXC3 |
Any info on this for 4.0 now that it's out? |
Well, from my end, I'm totally not looking into it right now. I'm currently more invested in porting Lua PluginScript to Godot 4 + GDExtension and other small Unity packages that I use on my day-to-day. There is PR #20 that ports the code to Godot 4, but it has an unsolved issue and wasn't merged yet. Also no floating/detachable windows in it. |
I thought to make a separate PR for the floating windows after the update PR. Sadly, I got stuck because I didn't know how to fix the issue. If it is OK for you, @gilzoide, I could integrate the floating windows in the PR #20 . Would you like to close it by using the X-Button, and it appears at the same position where it was detached? |
My issue with that is that the Dockable Container might be the covering the whole screen, so in a full screen experience it could be difficult to drag a panel "outside". My references for dragging tabs to the center of any other to detach them are the Unity editor and After Effects, I think it works very well. One can drag the panel to the tabs header to "fill the whole container", something that Dockable Container already does. |
Well, sure!
I guess 2 viable options are:
Either way, we also could have a way to tell the container which panels are closable and just close panels and not dock them back, in case they can be safely closed. |
Could you add the function that you can move the containers to new windows with the size that the container had before (and back again)?
Multible Windows come in Godot 4.0 or 4.1.
The text was updated successfully, but these errors were encountered: