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

☄ Move categories & entities via drag&drop #108

Merged
merged 14 commits into from Sep 6, 2023

Conversation

mrfelipemartins
Copy link
Contributor

@mrfelipemartins mrfelipemartins commented Sep 4, 2023

Description

This PR aims to implement a Drag & Drop system to the Entity Tree allowing us to reorder the tree at will and move Entities between Categories safely.

Addressed issues

#14

Implemented Rules

Categories

  • Cannot be dragged into themselves.
  • Can be dragged into other categories or reordered within the same category or new category.

Entities

  • Cannot be dragged into another entity.
  • Can only be dragged into categories or reordered within the same category or new category.

If an entity's properties will change as a result of being moved to another category, a confirmation dialog will be presented to the user.

@bitbrain
Copy link
Owner

bitbrain commented Sep 5, 2023

As mentioned on Discord, the API/Backend should be completely independent of any UI code. Instead of introducing concepts such as "tree" into the backend, introduce a method in the backend that handles moving entities/categories around in a "theoretical sense" and then the UI code accesses the Pandora singleton.

@mrfelipemartins mrfelipemartins marked this pull request as ready for review September 6, 2023 00:10
Copy link
Owner

@bitbrain bitbrain left a comment

Choose a reason for hiding this comment

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

Great job!

@bitbrain bitbrain merged commit 176ae12 into bitbrain:godot-4.x Sep 6, 2023
3 checks passed
@mrfelipemartins mrfelipemartins deleted the drag-and-drop-tree branch September 6, 2023 21:24
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.

None yet

2 participants