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

Early support for undo in ChangePlugin #257

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

arjo129
Copy link
Member

@arjo129 arjo129 commented Dec 27, 2024

New feature implementation

Implemented feature

This provides a POC version of undo for the ChangePlugin. We still have to implement undo for movement, adding and deleteing items. One thing to note is that the current architecture assumes a change at the individual component level. Also currently, we need ResMut access tot he undo buffer from all change plugins. There may come a time where we may want to change multiple components in a single operation. Perhaps Change should be something that

TODO

  • Deletion of entities
  • Addition of entities
  • Moving items

Implementation description

This provides a POC version of undo for the `ChangePlugin`. We still
have to implement undo for movement, adding and deleteing items. One
thing to note is that the current architecture assumes a change at the
individual component level. Also currently, we need `ResMut` access tot
he undo buffer from all change plugins. There may come a time where we may
want to change multiple components in a single operation.

Signed-off-by: Arjo Chakravarty <arjoc@google.com>
@arjo129 arjo129 linked an issue Dec 27, 2024 that may be closed by this pull request
1 task
@@ -212,6 +215,7 @@ impl Plugin for SitePlugin {
ChangePlugin::<Scale>::default(),
ChangePlugin::<Distance>::default(),
ChangePlugin::<Texture>::default(),
UndoPlugin::default()
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Move to lib.rs in case we want to run in headless mode

@arjo129 arjo129 linked an issue Dec 30, 2024 that may be closed by this pull request
1 task
@arjo129 arjo129 marked this pull request as ready for review February 4, 2025 08:10
Signed-off-by: Arjo Chakravarty <arjoc@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[Feature request]: Undo/Redo Support
1 participant