16
SFML projects / Re: The Hallowed Orb
« on: December 16, 2013, 10:38:37 pm »
Thanks, JuDelCo!
Yeah I can see some similarities with RoR
Yeah I can see some similarities with RoR
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.
sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT, 32), "solo");
while(window.IsOpened())
{
sf::Event windowEvent;
while(window.GetEvent(windowEvent))
{
if(windowEvent.Type == sf::Event::Closed)
window.Close();
}
window.Clear();
window.Display();
}
He just forgot a closing parenthesis after "sf::Joy::AxisX".
Thanks Epaik, that helps me a lot. But I don't understand why you put < -0.5 as a second parameter of getjoyaxis()
const sf::Input& Input = App.GetInput();
if(Input.IsJoystickButtonDown(0, 1))
{
//do something
}
if(Input.GetJoystickAxis(0, sf::Joy::AxisX < -0.5))
{
//move my guy left
}