Thanks for the quick fix.
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 Menu
m_items[m_hoveringItem].setTextColor(getRenderer()->m_textColor);#include <memory>
#include <string>
#include <SFML/Graphics.hpp>
#include <TGUI/TGUI.hpp>
int main() {
sf::RenderWindow window({ 640, 480 }, "test");
tgui::Gui gui(window);
gui.setFont("DejaVuSans.ttf");
auto listBox = std::make_shared<tgui::ListBox>();
listBox->setPosition(0, 0);
listBox->setSize(400, 400);
listBox->connect("DoubleClicked", [&]() {
listBox->removeAllItems();
});
for (int i = 0; i < 10; ++i)
listBox->addItem(std::to_string(i));
gui.add(listBox);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
gui.handleEvent(event);
}
window.clear();
gui.draw();
window.display();
}
return 0;
}