Started by Nafffen, 11 July 2023, 14:24:07
QuoteIs there a way, even tricky with custom code, to have a reference to sfml texture data ?
QuoteI thought I could do a trick by drawing a sfml sprite in the draw function of my custom widget
Quotebut the clipping doesn't work anymore obviously
QuoteI want to have a widget that embed a huge sf::Texture, but it takes some time to copy it into a tgui::Texture and I dont like that.
QuoteWhich clipping? Some clipping from your own code? Because a custom widget can define a clipping region during its draw code.
QuoteHave you tried drawing the sprite to a tgui::CanvasSFML (https://tgui.eu/tutorials/1.0/canvas/)?
QuoteHow big an how long are you talking about?
Quotebut the whole canvas is triggering events so even if I click on transparent area, the event is consumed. I tried to define a custom isMouseOnWidget to return false (because I dont care about events on this widget) but the event is still consumed.
Quotebut if you override the isMouseOnWidget to always return false then the events should pass to the widget behind it