You have to clone the project with git, not just download the source code from github.
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 Menutry {
// contents from main() function
} catch (const tgui::Exception& e) {
std::cerr << e.what() << "\n";
}// Create the RenderTexture and Sprite which the Canvas created for you
sf::RenderTexture rt;
sf::Sprite sprite;
// This code is executed only if gui.add is placed before setSize
rt.create(800, 600);
sprite.setTexture(rt.getTexture(), true);
rt.clear();
rt.display();
// This code is executed when calling setSize
rt.create(100, 100);
sprite.setTexture(rt.getTexture(), true);
rt.clear();
rt.display();
// This was your clear and display call
rt.clear({100,100,100});
rt.display();window.draw(sprite);
opengl32.lib
freetype.lib
opengl32.lib
winmm.lib
gdi32.lib
winmm.lib-DSFML_DIR=/ndk/sources/third_party/sfml/lib/armeabi-v7a/cmake/SFMLcmake -DSFML_DIR="D:/Andrew/Resources/SFML/lib/cmake/SFML" ..cmake_minimum_required(VERSION 3.12)
project(testSFML)
set(CMAKE_CXX_STANDARD 14)
add_executable(testSFML main.cpp)
set(SFML_DIR "D:/Andrew/Resources/SFML/lib/cmake/SFML")
set(TGUI_DIR "D:/Andrew/Resources/TGUI/lib/cmake/TGUI")
find_package(SFML REQUIRED COMPONENTS system window graphics network audio)
find_package(TGUI REQUIRED)
target_link_libraries(testSFML PRIVATE tgui sfml-graphics)button->getToolTip()->cast<tgui::Label>()->setText("Hello world");void buttonPressed(int index)
{
std::cout << "The " << index << "th button was pressed" << std::endl;
}
// The following goes in the for loop that you showed
b->connect("pressed", &buttonPressed, i);