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

Pages: [1]
1
System / Re: Problem with MouseButtonPressed
« on: June 12, 2020, 08:23:06 pm »
I fixed the problem, it was necessary to put this code in the event loop. As a result, I have this:

Event event;
while(window.pollEvent(event))
        {
            if (event.type == Event::Closed)
                {
                    window.close();
                }
            if (event.type == Event::MouseButtonPressed)
                {
                    if (event.mouseButton.button == Mouse::Left)
                        {
                            //Some code
                        }
                }
         }

2
System / Re: Problem with MouseButtonPressed
« on: June 12, 2020, 04:33:41 pm »
Fixed, but this still did not solve my problem

3
System / Problem with MouseButtonPressed
« on: June 12, 2020, 02:57:25 pm »
I have code

if (event.type == Event::MouseButtonPressed)
        {
            if (event.key.code == Mouse::Left)
            {
                  //Some code
            }
        }

I need that when long hold down the left mouse button this code does not work. (When you click on the mouse, this code should work once, while further holding mouse down, the code should not work) How to do it?
P.S. Sorry my english  ;)

Pages: [1]
anything