Updating existing Picture widget

Started by ingar, 15 May 2019, 22:08:19

ingar

Hi again,

I have this scenario:

I receive a .jpg file image on TCP/IP from an external server.
So I have a byte buffer (with a given length) containing the jpg file.

So how do I update an existing Picture widget from this buffer?

I know how to create a NEW Picture widget from a buffer, using an sf::Texture in the constructor,
but isn't it a bit overkill to create a new one every time? I saw that a function tgui::Picture::setTexture was available
in version 0.78, but this function has been removed in the latest version (0.85).

Ingar

texus

The texture became part of the renderer in 0.8, so you can use picture->getRenderer()->setTexture(...)