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

Topics - Phisn

#1
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).