The texture became part of the renderer in 0.8, so you can use picture->getRenderer()->setTexture(...)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteI am bit confused by the tgui::Ptr's. They cannot be C++ class pointers, since I cannot do new/delete on them. But still, I have to use -> operator, not dot(.).tgui::Widget::Ptr is simply a typedef for std::shared_ptr<tgui::Widget>. So they are pointers, but memory is managed automatically so you don't have to delete them.
QuoteI am worried to create memory/resource leaks.Removing widgets from the Gui and releasing memory are 2 different things (although in many cases they happen at the same time). Because widgets are stored as shared_ptr objects, the memory is only released when all pointers to it are gone. The gui object has pointers to the widgets it contains (and the group has pointers to the child widgets inside the group) and you may store pointers to widgets in your own code. If you remove the group from the gui or destroy the entire gui, the widgets will automatically be destroyed with it unless you were still storing these widgets somewhere in your own code.
messageBox->connect("ButtonPressed", [&retVal](const std::string& button){
if (button == "OK")
retVal = 0;
else if (button == "Cancel")
retVal = 1;
});
tgui::Widget::Ptr widget = gui.get("name"); // Without template you get the Widget base class (for when you don't need functions specific to the widget type)
tgui::Button::Ptr button = gui.get<tgui::Button>("name"); // With template you can get an object of the right type
button->connect("pressed", &merhaba, std::ref(window), i);Quotewe could prevent users to tamper with the themePersonally I don't think we should prevent people from tampering with resources if they want to change things. But loading from memory can of course have its use cases other than preventing tampering so it might still a useful feature.
QuoteI managed to install TGUI as Dynamic Library on my Raspberry PI 386 Debian Linux.Did you encounter any issues in doing this? It's been a few years since I tested TGUI on a Respberry Pi, so I'm interested to hear whether or not it still works without manual changes.
QuoteIn the long run it creates a lot of support issues.What kind of problems would you expect? I know it is possible to bundle the .so files with the application. It takes a lot of experimenting and you missed a file which causes it to break on newer linux systems several years later then you just need to ship that extra file. But I would consider the issues with .so files more on a short term, once you figure out how to do it properly it should continue to work on newer systems.
cmake_minimum_required(VERSION 3.5)
project(CMake-test)
add_executable(Test main.cpp)
set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML 2 COMPONENTS graphics window system REQUIRED)
target_link_libraries(Test PRIVATE sfml-graphics)
tgui::EditBox::Ptr m_ebNumSimulationSteps;verticalLayout_->setSize("100%", 150);