Render image alt text as a link if image is not drawn#40
Render image alt text as a link if image is not drawn#40abdullah-radwan wants to merge 1 commit intoenkisoftware:devfrom
Conversation
|
This message is intended for debug purposes, I'm not sure we would want this to silently fail or to draw the alt text as a link. Perhaps we could include a debug setting in |
|
Given that the "failure" happens when no image callback is defined or when it returns a MarkdownImageData with isValid set to false, then the user already knows there is an issue, so there shouldn't be any surprises if the image wasn't drawn. If the library was actually checking for the validity of the image texture or if ImGui::ImageWithBg was returning a boolean value for example, I can perhaps see a use case for a debug mode. But with how things are set currently, I don't think a debug mode makes sense. |
I disagree. There are two errors possible here as you've identified. Rather than decreasing the amount of debug information presented to the developer we should probably add a little more.
I do. Thinking about it more I also think that using the I'll get around to making these changes and merge your code in with the new code when I have time. |
Hello again!
Currently, the 'Image not loaded' message is rendered if an image wasn't drawn. There are 2 issues with this:
This PR renders the image alt text as a link if an image wasn't drawn.