-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
TreeItem add move up/down function #30116
Comments
Makes sense, though I'm not sure if that can be added to TreeItem itself, I guess it would have to be a method of Tree? E.g. |
Either way is fine with me <3 |
Any comments on which one of these is better? Polls on github would be nice.
|
Well it's not a matter of polling, but of checking the actual implementations of Tree, TreeItem and their interactions, to see what is possible / makes sense given their design. The Tree/TreeItem APIs are a bit peculiar, and it seems item management mainly goes through TreeItem (where a TreeItem can give you a reference to its previous or next TreeItem in the parent Tree), so I suppose that's where the move methods would have to go, even if it stays a slightly unintuitive API. But again I haven't checked the code, those are just some comments to point interested contributors in possible directions :) |
forgive me if i am mistaken, but since the node scene list in the editor lets you drag to any position, this should be possible already? |
@girng https://github.com/godotengine/godot/blob/master/editor/scene_tree_dock.cpp |
@TheDuriel interesting, TIL. nvm my prev comment then :p. ty |
Is it still valid proposal after #46773? |
I think that #46773 functionally solves this, though it's very awkward. Say you want to move a node one down in the tree:
And move it two up.
A dedicated move_up(x) move_down(x) and raise() would be preferable. |
Godot version:
3.1
Issue description:
Right now TreeItem implements move_to_top() and move_to_bottom() to move the item to the first or last position among its siblings.
I would like the ability to move an Item by an arbitrary amount. I am currently building a modding system ala skyrim, and need to ability to move tree items to arbitrary positions in the list.
The text was updated successfully, but these errors were encountered: