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 - Aiiro

#1
Hello again.

I have a question about the class AnimatedSprite (https://github.com/SFML/SFML/wiki/Source:-AnimatedSprite) in SFML and TGUI.
So I created the class AnimatedSprite and tested it, it works well with a SFML window, however it doesn't work in a TGUI window. I suppose it's because TGUI only draw the widgets once and don't update unless an event is trigerred.
Do you know a way to add animated sprites in a TGUI window or it's just impossible ?

Thanks in advance,
Aiiro
#2
Hello,

So I need to ask the user on where he wants to save a file or open one, I already tried to see with wxWidgets, but I don't really know how to implemant tgui with this.
Anyone already had done this before ?

Thanks in advance,

Aiiro
#3
Hello,

I have issues with callbacks with my buttons in my project :
Button::Ptr quit(gui);
    quit->load("widgets/White.conf");
    quit->setText("Quit");
    quit->setSize(230,50);
    quit->setCallbackId(12);
    quit->bindCallback(tgui::Button::LeftMouseClicked);
    quit->setPosition(800,600);

This is a bit of code in one of my functions, but all buttons are the same (with different callback IDs of course) and here it is how I handle it :
while (window.isOpen())
    {

        sf::Event event;

        while (window.pollEvent(event))
        {

            if (event.type == sf::Event::Closed)
            {

                window.close();

            }

            gui.handleEvent(event);


        }

            tgui::Callback callback;
            while (gui.pollCallback(callback))
            {

                if (callback.id == 12)
                {

                    window.close();

                }

Again it's a just a bit of code, but all other callbacks are handled the same way.
The thing is that I can't even click on the buttons, it's not like nothing is appearing when I click on them, I don't even see I click on them.
I tried a lot of things, but I just can't figure out why it is not working.

Thanks for your help.