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

Pages: 1 [2] 3
16
General discussions / Re: Why would I choose SFML over SDL2?
« on: December 23, 2020, 12:49:58 pm »
I think it would be better if you just give a chance both. But if you have experience with SFML why you want to switch to something else?

17
SFML website / Re: a "beginners" board in forum?
« on: December 18, 2020, 02:49:11 pm »
I'm new on the forum and my comment above isn't against this idea - I was wondering why just not change description for "General" section.
I'm totally endorse your idea, from my point of view much better to give any reasonable enough idea chance and if it goes bad - then close it as unsuccessful experiment.

18
Feature requests / Re: Animations and Particles
« on: December 18, 2020, 11:20:57 am »
you all keep saying that, but its not really true                       
how many non-game applications have been made using sfml compared to how many games made with sfml   

In fact there are enough GUI library that based on SFML - A Comparison of GUI Libraries for SFML: TGUI vs SFGUI vs IMGui and more. They could be used for games and could contained any module that suits for their maintainers. And they also could be used for non-game applications because choice from C++ GUI libraries is small (Qt(has license issue), wxWidgets(stable, but use OS's native widgets) and ImGui(immediate mode not always is advantage)).

19
SFML website / Re: a "beginners" board in forum?
« on: December 18, 2020, 10:55:16 am »
There are enough other places for C++ beginners questions that unrelated to SFML, but as far I understand Help->General is already used for such questions that related to SFML.

20
Audio / Re: SoundBuffer error "Incomplete type not allowed"
« on: December 10, 2020, 09:03:52 am »
Did you also move line
#include <SFML/Audio.hpp>
into your header?

21
If you want resize window inside handler than you should call window.setSize there.

So change it to:
if (test2Btn.contains(mousePosFloat))
               {
                  boardObject.ResetGame(cfgWindowMaker);
                  cfgWindowMaker.ReadingCFGFile("boards/configintermediate.cfg");
                  boardObject.RandomBombMaker(cfgWindowMaker, window);
                  window.setSize({ cfgWindowMaker.GetWidth(), cfgWindowMaker.GetHeight() });
                  //view will change in resize handler
               }

22
In that case you have mistake somewhere else. Can you provide minimal, but complete code for reproducing the behaviour? Or maybe you already loaded your project on Github or something?

23
For resizing use code from there:

// the event loop
sf::Event event;
while (window.pollEvent(event))
{
    ...

    // catch the resize events
    if (event.type == sf::Event::Resized)
    {
        // update the view to the new size of the window
        sf::FloatRect visibleArea(0, 0, event.size.width, event.size.height);
        window.setView(sf::View(visibleArea));
    }
}

24
General / Re: SFML- Thread
« on: December 06, 2020, 11:04:43 am »
How your thread is supposed to work?
Start thread inside key pressed handler is no different from starting thread elsewhere:


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

            if (event.type == sf::Event::KeyPressed &&
                event.key.code == sf::Keyboard::A
                )
            {
                std::thread t([]
                    {
                        std::cout << "Thread executing\n";
                    });

                t.join(); //wait for executing, joinable thread
            }
        }

25
Kvaz1r, hopefully, this will help you with your setup as well?

Hey, my setup is ok, topic started is other user ;)

26
Can you attach your project files here? It seems that you don't set include path properly. Maybe didn't change configuration (Debug|Release) or something else.

27
Audio / Re: The program crashes when I use "sf::Music"
« on: October 24, 2020, 11:49:29 am »
Ok, found a workaround - I rebuilded "fresh" release of OpenAL(openal-soft-1.20.1) and replace .dll that came with SFML with new one. Everything works now.
I absolutely have any idea why it works though.

But maybe it's time to upgrade anyway?

28
Audio / Re: The program crashes when I use "sf::Music"
« on: October 24, 2020, 10:26:59 am »
I also have the same issue with VS2019.

29
Could you attach your project files?

30
Graphics / Re: SFML Draw() won't draw sprite on Window
« on: October 16, 2020, 10:52:57 am »
As much as I've understood ship = Ship(); is like calling the constructor. But I was wondering why Ship ship doesn't do the same.
ship = Ship();
it's assign to variable ship of new object with type Ship.
Ship ship
it's creation of new variable ship with type Ship. Different scopes can have different variables with same name i.e. hidding.

Pages: 1 [2] 3