Allow drag/drop textures in editor (Untested)
May need to rework the ImGuiPayload creation, adapted from: https://github.com/NoahGWood/VersaMachina/blob/main/VersaEditor/src/EditorLayer.cpp
Describe the issue (if no issue has been made)
People generally expect to be able to drag/drop items from the content pane into the viewport and onto game objects.
PR impact
List of related issues/PRs this will solve:
| Impact | Issue/PR |
|---|---|
| Issues this solves | None |
| Other PRs this solves | https://github.com/TheCherno/Hazel/pull/487 |
Proposed fix
Check if texture file has been dropped on sprite component in the editor & set the texture
Additional context
Tasks to validate:
- [ ] Build Hazelnut
- [ ] Start Hazelnut
- [ ] Add entity to scene
- [ ] Add SpriteRendererComponent to entity
- [ ] Drag & drop a texture (.png file) from the content browser panel into an empty space on viewport
- [ ] Drag & drop a texture (.png file) from the content browser panel onto the quad in the viewport
Sorry, but there already is a pull request on the very same topic: https://github.com/TheCherno/Hazel/pull/487/files#diff-075edf150e3610e06dc7477cd660bd51a62dd452ddc920dc500d41adafda1689
Sorry, but there already is a pull request on the very same topic: https://github.com/TheCherno/Hazel/pull/487/files#diff-075edf150e3610e06dc7477cd660bd51a62dd452ddc920dc500d41adafda1689
Ah, didn't see that, I'll update my PR to reflect that