Haha, it should be more accurate than my implementation then. Thanks for your efforts.
btw this ignoreMouseEvents thing is also very pleasant to have. Nice update.
btw this ignoreMouseEvents thing is also very pleasant to have. Nice update.
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
#include <SFML/Graphics.hpp>
#include <TGUI/TGUI.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "gui test");
window.setFramerateLimit(60);
tgui::Gui gui(window);
try
{
tgui::Theme theme{"data/Black.txt"};
auto button1 = tgui::Button::create();
auto button2 = tgui::Button::create();
auto group = tgui::Group::create();
group->add(button1, "button");
group->add(button2);
button1->setRenderer(theme.getRenderer("Button"));
button2->setRenderer(theme.getRenderer("Button"));
button2->setPosition({"button.right + 100", "button.top"}); //error here
gui.add(group);
}
catch (const tgui::Exception& e)
{
std::cerr << "TGUI Exception: " << e.what() << std::endl;
return -1;
}
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;
}