Welcome, Guest. Please login or register. Did you miss your activation email?

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.


Messages - manolismi

Pages: [1]
1
Window / Re: Create 2 windows
« on: July 11, 2014, 10:43:49 am »
God it doesn't work! The same! And i just realised that in winXP the application crashes upon execution both with the master and the focus-request branch. Would you like me to send you the whole project to test it?

2
Window / Re: Create 2 windows
« on: July 11, 2014, 08:28:35 am »
Ok, i tried your program and mine with:
a)SFML 2.1 precompiled, the binary mingw distribution from
http://www.sfml-dev.org/download/sfml/2.1/
b)the source code of SFML2.1, which i built with cmake, from
http://www.sfml-dev.org/download/sfml/2.1/ and
c)the master source code master.zip, which i built with cmake, from https://github.com/SFML/SFML/archive/master.zip

Your code worked for me only with the master.zip edition (c), with a and b the pop-up was non-responsive.
Mine didn't work at all, with a and b it freezed when i clicked the options button and with c it didn't freeze, and the window was responsive (alt+f4 closed it and continued to the fullscreen window normally), but the window poped-up behind the fullscreen one. I don't see it, but if i click on the area the 'x' button is, it closes.

So, is there a way to move a window at the top, above every other and give it focus?

3
Window / Re: Create 2 windows
« on: July 10, 2014, 12:12:05 pm »
I downloaded the latest stable version and compiled it again but nothing.

4
Window / Re: Create 2 windows
« on: July 09, 2014, 08:30:34 pm »
I compiled your code and it doesn't work for me... The same problem. I have windows 7 32-bit, mingw 4.8.1 32-bit release and dev-cpp 5 .6.3 IDE. When i click the blue window, the green pops up and is non-responsive.

5
Window / Re: Create 2 windows
« on: July 09, 2014, 05:26:11 pm »
I modified the post to show my code after the changes suggested by Laurent.
main.cpp calls menu->mouseclicked(). menu->mouseclicked() checks where is the mouse and calls
obutton->clicked() (obutton is "options" button) if the mouse is over obutton. And obutton::clicked() opens the blue window. My fullscreen window doesn't refresh anymore of course because of the while(owindow.isOpen) loop, but the blue window doesn't respond either, so i cannot close it and get the fulscreen window responsive again.

6
Window / Re: Create 2 windows
« on: July 09, 2014, 04:59:31 pm »
Yes, you're right. I moved the draw commands outside the event loop. Still though, in both of my computers a non-responsive blue window pops up. If i click 'x', it doesn't close. So i kill it with the task manager again. Yes, i have sfml2.1 under windows but even if i click on the titlebar the window doesn't get focus.

7
Window / Create 2 windows
« on: July 09, 2014, 04:09:33 pm »
I have a game displayed on a fullscreen window that works fine. In this game i have an options button. When you click it, i want a second window(non fullscreen) to pop up and the fullscreen window to be unresponsive until you close the other. So in main.cpp i have a standard window loop:

main.cpp
static sf::RenderWindow window(sf::VideoMode(1152,864),"Palindromo test",sf::Style::Fullscreen);
int main()
{
        window.setVerticalSyncEnabled(true);
        menu = new Menu(&window);
        while (window.isOpen())
        {      
                sf::Event event;
                while (window.pollEvent(event))
                {
                        window.clear(sf::Color::White);
                        switch (event.type)
                        {
                                case sf::Event::Closed:
                                        window.close();
                                        break;
                                case sf::Event::MouseMoved:
                                        menu->mousemoved();
                                        break;
                                case sf::Event::MouseButtonPressed:
                                        menu->mouseclicked();
                                        break;
                                case sf::Event::KeyPressed:
                                        if (event.key.code == sf::Keyboard::Escape)
                                                exit(0);
                                                break;
                        }
                }
                menu->display();
                window.display();
        }
        return 0;
}
 

Menu is a class i created. So menu->mouseclicked() checks if some button of menu was clicked; if you click the options button this executes:

void Obutton::clicked()
{
        sf::RenderWindow owindow(sf::VideoMode(800,600),"Options",sf::Style::Close);
        owindow.setVerticalSyncEnabled(true);
        while (owindow.isOpen())
        {
                sf::Event event;
                while (owindow.pollEvent(event))
                {
                        switch (event.type)
                        {
                                case sf::Event::Closed:
                                        owindow.close();
                                        break;
                        }      
                }
                owindow.clear(sf::Color::Blue);
                owindow.display();
        }
}
 

My problem is that when i click the Obutton(options button), in my first computer, the game just freezes. In my other computer, a non-responsive transparent window pops up. After about 10-20 seconds it gets blue as desired and responds, but if you click outside it, it gets non-responsive, this time for ever, even if you click on it again. So i close it with the task manager. Why isn't it working? Do i need to activate the pop-up or something? Thanks.

8
Graphics / Re: Non ascii text problems
« on: June 13, 2014, 08:33:24 pm »
Ixrec thank you very much, you're my savior!!!! I opened the source file with notepad from windows and just changed the encoding and worked. :)

9
Graphics / Re: Non ascii text problems
« on: June 09, 2014, 10:00:11 pm »
I don't know, I tried to find so in the editor options but it doesn't say anything.
I searched google and found out that by using your codepage it works.
I did so, and i print it with wcout but it prints nothing although it compiles.
Could utf-8 get enabled with a macro or a linker command?

10
Graphics / Non ascii text problems
« on: June 09, 2014, 08:05:21 pm »
I want this text to be shown: Το παλίνδρομο τεστ!
It's non ASCII so I use the L as told in the tutorials: text.setString(L"Το παλίνδρομο τεστ!");
And i get error : 17   13   E:\plir\Untitled7.cpp   [Error] converting to execution character set: Illegal byte sequence

I use dev c++ 5.6.3 with mingw

Pages: [1]