Use Picture::create in examples instead of std::make_shared

0.8
Bruno Van de Velde 2016-09-17 17:01:36 +02:00
parent 5b1afd4dc5
commit cab5e7d175
3 changed files with 3 additions and 3 deletions

View File

@ -48,10 +48,10 @@ int main(int argc, char *argv[])
sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "");
tgui::Gui gui(window);
auto picLandscape = std::make_shared<tgui::Picture>("Background-Landscape.png");
auto picLandscape = tgui::Picture::create("Background-Landscape.png");
gui.add(picLandscape, "Landscape");
auto picPortrait = std::make_shared<tgui::Picture>("Background-Portrait.png");
auto picPortrait = tgui::Picture::create("Background-Portrait.png");
gui.add(picPortrait, "Portrait");
// The button will quit the program

View File

@ -37,7 +37,7 @@ int main()
{
tgui::Theme theme{"../../widgets/Black.txt"};
gui.add(std::make_shared<tgui::Picture>("../RedBackground.jpg"));
gui.add(tgui::Picture::create("../RedBackground.jpg"));
auto tabs = tgui::Tabs::create();
tabs->setRenderer(theme.getRenderer("Tabs"));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB