0 Members and 1 Guest are viewing this topic.
sf::Event Control; while (App.GetEvent(Control)) { if ((Control.Type == sf::Event::KeyPressed) && (Control.Key.Code == sf::Key::Left)) bool left = true; if ((Control.Type == sf::Event::KeyReleased) && (Control.Key.Code == sf::Key::Left)) bool left = false; if ((Control.Type == sf::Event::KeyPressed) && (Control.Key.Code == sf::Key::Right)) bool right = true; if ((Control.Type == sf::Event::KeyReleased) && (Control.Key.Code == sf::Key::Right)) bool right = false; if ((Control.Type == sf::Event::KeyPressed) && (Control.Key.Code == sf::Key::Up)) bool up = true; if ((Control.Type == sf::Event::KeyReleased) && (Control.Key.Code == sf::Key::Up)) bool up = false; if ((Control.Type == sf::Event::KeyPressed) && (Control.Key.Code == sf::Key::Down)) bool down = true; if ((Control.Type == sf::Event::KeyReleased) && (Control.Key.Code == sf::Key::Down)) bool down = false; } sf::Event Event; while (App.GetEvent(Event)) { if (Event.Type == sf::Event::Closed) App.Close(); if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape)) App.Close(); }