1
General / SFGUI Multiple sfg::Desktop
« on: June 21, 2018, 02:08:20 am »
Hi, this might be not related to SFML but i cant find anywhere how to have 2 sfg::Desktops drawn seperately.
Im trying to draw a gui for my main application and a seperate one inside a sf::RenderTexture.
Im trying to draw a gui for my main application and a seperate one inside a sf::RenderTexture.
sfg::SFGUI sfgui;
sfg::Desktop desk1;
sfg::Desktop desk2;
//Add stuff to desktops
sf::RenderTexture texture;
texture.create(512,512);
//Draw code
window.clear();
texture.clear();
sgui.Display(texture); //??? will draw both desktops, but want to draw only desk1
texture.display();
sfgui.Display(window); //??? will draw both desktops, but want to draw only desk2
window.display();
//Draw code
sfg::Desktop desk1;
sfg::Desktop desk2;
//Add stuff to desktops
sf::RenderTexture texture;
texture.create(512,512);
//Draw code
window.clear();
texture.clear();
sgui.Display(texture); //??? will draw both desktops, but want to draw only desk1
texture.display();
sfgui.Display(window); //??? will draw both desktops, but want to draw only desk2
window.display();
//Draw code