Use Picture::create in examples instead of std::make_shared
parent
5b1afd4dc5
commit
cab5e7d175
|
@ -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
|
||||
|
|
|
@ -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 |
Loading…
Reference in New Issue