Revamp autoload creation#91124
Hidden character warning
Conversation
d7033b3 to
e4436ff
Compare
194a488 to
a477790
Compare
|
A nitpick: so much text on the buttons is a bit overwhelming, no? "existing" and "autoload" are obvious from context |
|
Why are the buttons centered? |
There is an awkward empty space when they are aligned to one side. |
Still odd to have them like this, since everywhere else in the editor buttons tend to be aligned to one side when on the top. |
a477790 to
14a5b3d
Compare
|
Just want to check there was this scenario while selecting a script you can change the name of the node, which does not have to be the same name as the script (Ignore case) Now couple of issues I found in 4.3:
Also agree with @passivestar comments, I think |
That's intended. It opens the script in script editor.
There is no obvious use-case, but it's not wrong either. No reason to prevent that I think.
|
14a5b3d to
fff7880
Compare
|
Rebased and fixed some errors. Autoload dialog now uses its own SceneCreateDialog and no longer open the scene when created. |
fff7880 to
4e4d155
Compare
|
Thanks @KoBeWi for the update. |
4e4d155 to
8acdea4
Compare
|
I would love to see this in the next release of Godot! Let me know if there's anything I could do to help make that a reality 🙂 I especially like the change to have it use its own dialog for both the scene and script, rather than re-using the filesystem dock one as it was previously doing! It still behaves weirdly in that you can click out of the pop-up and it goes behind the project settings, though I think that's a much larger problem than just this (which I'm guessing already has it's own Issue somewhere, unless it's already fixed on latest master?). |
8acdea4 to
0da50d4
Compare
Nice, hope it gets in soon then! I'm personally partial to having more than one way to do things in UIs (more likely users will discover it), however in this case I feel it was also counter-intuitive that a folder icon opened the file itself (rather than just revealing it in the file system dock). Great work overall! |
0da50d4 to
022448a
Compare
|
This fails to compile when rebased on top of |
de05250 to
a08c4e4
Compare
|
Try now. |
passivestar
left a comment
There was a problem hiding this comment.
Tested, works as expected and the UX is a clear improvement over the previous one
AdriaandeJongh
left a comment
There was a problem hiding this comment.
Also tested this and found this little icon on hover (it doesn't do anything):

And while we're at it: would be nice to give the headers a tooltip. Especially the Global Variable could use something along the lines of "If enabled, this autoload can be accessed by scripts through $Name where 'Name' is replaced with the name of the autoload".
It's not an icon but the main tree cell that the buttons are attached to. I looked briefly into getting rid of it while working on the UI for 4.6 but afair there's no easy way to get rid of it. Ideally we should allow adding any control nodes to tree cells (or allow custom drawing/input logic in cells) because this system with icon buttons on the right is very limiting. Either way this issue is unrelated to this PR |
a08c4e4 to
52c2628
Compare
AdriaandeJongh
left a comment
There was a problem hiding this comment.
If the bug I mentioned above isn't in the scope of this PR, then the rest looks good to me.
You can already set a tree cell to |
|
CELL_MODE_CUSTOM still draws regular TreeItem elements (text, hover), the custom drawing only replaces the background. |
Oh right, then I'd say drawing the background using the tree's button stylebox and make this cell with 3 buttons 3 cells with that behaviour would fall under this PR's scope |
|
This is a pre-existing problem and does not affect creating autoloads, so IMO it is out of scope. Feel free to open an issue, so it's tracked properly. |
|
Thanks! |




Closes #17110
Closes godotengine/godot-proposals#10691
Autoload name is assigned automatically from file name (or root name in case of scene) and there is basic validation to create valid identifier, as otherwise you'll be met with an error dialog. Hopefully it won't be a big problem. If you don't like auto-generated name, you can rename the autoload by double-clicking it in Tree (although the default name is fine in most cases, hence the text inputs were mostly useless).
godot.windows.editor.dev.x86_64_3O8K4gmvOh.mp4
I'm getting some errors about exclusive children™, though they already existed with the script dialog. Not sure how to fix.