Main Menu
Menu

Show posts

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

Messages - Phisn

#1
Help requests / Re: Button not showing
08 May 2018, 16:41:17
Thanks, I already solved it. The problem was that I created tgui::Gui before sf::Renderwindow.
But I still have a question, how can I load fonts and Themes from streams instead of a file?
#2
Help requests / Button not showing
07 May 2018, 21:48:16
I'm trying to get a simple button showing but it does not work.
try {
        tgui::Button::Ptr button = tgui::Button::create("Test Button");

        button->setSize(50, 40);
        button->setPosition(0, 0);
        button->connect("pressed", [this]()
        {
            this->onButtonPressed();
        });

        gui.add(button);
    }
    catch (tgui::Exception exception)
    {
        std::cout << exception.what() << std::endl;
    }


I'm sure that all events are handled and gui.draw() is called (loop).