1
Window / Detecting if a key was pressed, not if it is always down
« on: December 27, 2009, 01:34:27 am »
Thank you all for the quick responses, it is now working perfectly.
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.
int NoteReceptors::CheckInput(sf::RenderWindow &Window)
{
const sf::Input& GetInput = Window.GetInput();
if (GetInput.IsKeyDown(sf::Key::Left) && TickL == 0)
{
TickL = 1;
ScaleL = 0.6;
}
else
{
TickL = 0;
}
if (ScaleL < 1) {ScaleL += 0.1;}
in the main loop so it does increase when the key is released.