Skip to content

Add a BitMap preview to the inspector - #60008

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
fire-forge:bitmap-preview
Apr 26, 2022
Merged

akien-mga merged 1 commit into
godotengine:masterfrom
fire-forge:bitmap-preview

Conversation

@fire-forge

Copy link
Copy Markdown
Contributor

Closes godotengine/godot-proposals#4307

Adds a BitMap preview to the inspector.

image

@timothyqiu

Copy link
Copy Markdown
Member

Maybe TexturePreview can be reused to get a uniform look. (Although needs to add a texture filter setter for it.)

Comment thread editor/plugins/bit_map_editor_plugin.cpp Outdated
@fire-forge

Copy link
Copy Markdown
Contributor Author

@timothyqiu I considered using TexturePreview, but I decided not to do that because it would add more complexity to it. There would have to be a special case for taking the image from the BitMap, setting texture filter to nearest, and hiding the checkerboard and image format label. This PR just uses a TextureRect and Label which is much simpler than making all those modifications to TexturePreview.