Hazel icon indicating copy to clipboard operation
Hazel copied to clipboard

Implemented Texture Icons/Thumbnails

Open PrakarshPanwar opened this issue 3 years ago • 0 comments

Describe the issue (if no issue has been made)

  • Currently Hazel has no Image Icons/Thumbnails in ContentBrowserPanel for Texture Files, it is represented by Standard File Icon
  • Same with SpriteRendererComponent in Properties Panel, there is only Texture drag/drop button and not an Image Button Icon

PR impact (Make sure to add closing keywords)

List of related issues/PRs this will solve:

  • Adds Textures as Image Icons in ContentBrowserPanel
  • Adds ImGui.ImageButton instead of ImGui.Button for Texture in SpriteRendererComponent in Properties Panel. To remove texture right-click on Image Button then click Remove Texture
Impact Issue/PR
Issues this solves None or #number(s)
Other PRs this solves None or #number(s)

Proposed fix (Make sure you've read on how to contribute to Hazel)

A short description of what this fix is and how it fixed the issue you described.

Additional context

  • [x] Currently if Texture file was deleted or modified, we won't be able to erase it from std.unordered_map cache. Possible solution is to use filewatcher
  • [ ] Now for textures that take longer than 0.02 seconds to load completely on directory will result in black thumbnails

PrakarshPanwar avatar Nov 14 '22 13:11 PrakarshPanwar