Thanks very much.
Btw, your library is awesome
Btw, your library is awesome
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<TGUI/TGUI.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "TGUI");
sf::CircleShape shape(100);
tgui::Gui gui{window};
auto theme = tgui::Theme::create("TGUI/widgets/Black.txt");
//tgui::Button::Ptr bClickMe = tgui::Button::create("Click me!");
tgui::Button::Ptr bClickMe = theme->load("Button");
bClickMe->setText("lol");
bClickMe->setPosition("50%", 100);
gui.add(bClickMe);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed || event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) {
window.close();
}
gui.handleEvent(event);
}
window.clear(sf::Color(128, 128, 128));
window.draw(shape);
gui.draw();
window.display();
}
}