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

✨ Remove Entity Component from Entity #286

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

softwareantics
Copy link
Owner

@softwareantics softwareantics commented Dec 1, 2023

Description

  • Added RemoveComponent command to EntityComponentViewModel to handle removing a component from an Entity.
    • Fires an EntityModifiedMessage so that other UI elements can update their view.
  • Added a message handler to EntityInspectorViewModel that refreshes the collection of components if an Entity has been modified.
  • Ensured that the TagComponent cannot be removed from the Entity.
  • Created an IconButton as required by the issue.
  • Updated the EntityComponentView to display a settings button that can be clicked to display a ContextMenu used to remove components from the desired Entity.

Fixes #280

Dependencies

This PR introduces no new dependencies.

Type of change

  • New feature (non-breaking change which adds functionality).

How Has This Been Tested?

I have provided unit tests to accommodate my changes. I ensured the application works as expected and that I can create an entity, display multiple components and remove an individual component.

Test Configuration:

  • Operating System: Windowos 11 Pro
  • Hardware: Intel i9-10900 @ 2.80GHz, 32GB RAM, RTX 3080
  • Toolchain: VS Professional 2022 17.8.1
Recording.2023-12-02.235440.mp4

Possible Issues

Tickets have been added to the backlog to address the following issues:

  • When a component is removed, the Entity Inspector refreshes it's components and causes any component that is hidden to be shown again. This will likely be fixed when this is fixed.
  • To display the context menu when clicking the settings icon the user is required to right click. This will need to be addressed at some point.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes generate no new warnings

Copy link
Owner Author

@softwareantics softwareantics left a comment

Choose a reason for hiding this comment

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

A few things I noticed in the pre-review.

@softwareantics softwareantics self-assigned this Dec 2, 2023
@softwareantics softwareantics added ✨ Feature Additional functionality that has not been implemented. 🔴 High Priority High priority area-ecs ECS related tasks area-editor Editor related tasks labels Dec 2, 2023
@softwareantics
Copy link
Owner Author

A few things I noticed in the pre-review.

Fixed ☺️

@softwareantics softwareantics changed the title Initial ✨ Remove Entity Component from Entity Dec 2, 2023
@softwareantics softwareantics marked this pull request as ready for review December 2, 2023 13:06
@softwareantics softwareantics merged commit 72c2dfa into master Dec 2, 2023
17 of 18 checks passed
@softwareantics softwareantics deleted the feature/remove-component branch December 2, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ecs ECS related tasks area-editor Editor related tasks ✨ Feature Additional functionality that has not been implemented. 🔴 High Priority High priority
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

✨ Remove Entity Component from Entity
1 participant