Added a dropdown to select loaded images in the inspector for Handle<Image>. #190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hiya! Took a crack at this as discussed in Discord.
Looks like a big change, but a large part of the diff is just moving some of the functionality from
ui_readonly
to aupdate_and_show_image
function to make passing the world a little easier between it and the mutableui
function.This likely isn't ready to merge yet, just wanted to get the pull request going and get eyes on the last issue I'm having with it - for some reason an error is generated when line 33 is uncommented - this works in the non-mutable
ui_readonly
, but for some reason in the mutable version the compiler complains about aself
borrow escaping the scope of the function. Not sure why, still looking into that.One more thing I wanted to ask about: for my purposes, I'm interested in showing all available assets, not just loaded ones. I'd probably go about implementing that using
AssetReader
to get all available asset paths instead of just iterating overAssets<Image>
. It'd probably be a bit more complex but a lot more powerful as an editor tool and more generalizable to anyHandle<Asset>
type. Is that something you'd be interested in for a future PR?Thanks! :)