bogue icon indicating copy to clipboard operation
bogue copied to clipboard

Mutable `Image` Widget

Open Aidan-McNay opened this issue 10 months ago • 1 comments

(Feature Request, not critical)

An issue I've come upon several times is trying to update an Image Widget, similar to how you can change the styles/text of other widgets. The current workaround is to have it as a Resident layout and change the room to a new Resident with a new widget, but it's kinda clunky. I'm wondering whether there's a way to update the SDL texture associated with the image instead? Something like

val update_image : Bogue.Image.t -> Bogue.Image.t -> unit

where update source target would mutate target to have the same texture (and therefore image) as source

Happy to take a stab at it (although currently in uni, may be a while), but wanted to get a rough sense of "is this feasible" from someone who might know more :)

Aidan-McNay avatar Apr 18 '24 04:04 Aidan-McNay