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

#1
I have added you
#2
I have already done what you say.

Btw have you got a skype account so we can talk there, btw we have a c++ group on skype
#3
I didnt understand what did you say but I have already compiled sfml myself. Does tgui need static or dynamic libs on SFML folder?
#4
I couldnt recompile it because it says cmake cant find sfml even when I choose my sfml directory.
SFML dont work on my computer without including that stuff which you removed.
I see that:

Precompiled libraries were removed after a big memory leak was found (September 13th). The problem has been fixed in the latest development snapshot.
Download TGUI v0.6 alpha2 (with precompiled GCC 4.7 TDM (SJLJ) 32 bits libraries for SFML 2.1)
Download TGUI v0.6 alpha2 (with precompiled Visual C++ 10 (2010) 32 bits libraries for SFML 2.1)
Download TGUI v0.6 alpha2 (with precompiled Visual C++ 11 (2012) 32 bits libraries for SFML 2.1)

Download the latest development snapshot from github.
#5
Here it is
#6
it crashes there:
editBoxUsername->load("objects/EditBox/Black");

I am using TDM 4.8 with code blocks 12.11

I am using them staticly

My debugger dont run and I dont know why

it crashes in debug mod
#7
I am trying to run that code but it crashes when it try to load an object:


#include <TGUI/TGUI.hpp>
#include <iostream>

void loadObjects( tgui::Window& window )
{
    // Create the background image
    tgui::Picture* picture = window.add<tgui::Picture>();
    picture->load("Back1.png");
    picture->setSize(800, 600);

    std::cout << "1\n";

    // Create the username label
    tgui::Label* labelUsername = window.add<tgui::Label>();
    labelUsername->setText("Username:");
    labelUsername->setPosition(200, 100);

    std::cout << "2\n";

    // Create the password label
    tgui::Label* labelPassword = window.add<tgui::Label>();
    labelPassword->setText("Password:");
    labelPassword->setPosition(200, 250);

    std::cout << "3\n";

    // Create the username edit box
    tgui::EditBox* editBoxUsername = window.add<tgui::EditBox>();     std::cout << "3.2\n";
    editBoxUsername->load("objects/EditBox/Black");                   std::cout << "3.4\n";
    editBoxUsername->setSize(400, 40);                                std::cout << "3.6\n";
    editBoxUsername->setPosition(200, 140);                           std::cout << "3.8\n";

    std::cout << "4\n";

    // Create the password edit box (we will copy the previously created edit box)
    tgui::EditBox* editBoxPassword = window.copy(editBoxUsername);
    editBoxPassword->setPosition(200, 290);
    editBoxPassword->setPasswordChar('*');

    std::cout << "5\n";

    // Create the login button
    tgui::Button* button = window.add<tgui::Button>();
    button->load("objects/Button/Black");
    button->setSize(260, 60);
    button->setPosition(270, 440);
    button->setText("Login");

    std::cout << "6";
}


int main()
{
    // Create the window
    tgui::Window window(sf::VideoMode(800, 600), "TGUI window");

    // Load the font (you should check the return value to make sure that it is loaded)
    window.globalFont.loadFromFile("D:/TGUI/Fonts/DejaVuSans.ttf");

    loadObjects( window );

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();

            // Pass the event to all the objects (if there would be objects)
            window.handleEvent(event);
        }

        window.clear();

        // Draw all created objects
        window.drawGUI();

        window.display();
    }

    return EXIT_SUCCESS;
}