Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::Event::TextEntered - key repeat bug?  (Read 2528 times)

0 Members and 1 Guest are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6274
  • Thor Developer
    • View Profile
    • Bromeon
sf::Event::TextEntered - key repeat bug?
« on: October 30, 2009, 09:33:16 pm »
Hi,

I noticed that the TextEntered event is triggered repeatedly, even if sf::Window::EnableKeyRepeat(false) was previously called. I don't consider this behaviour intended. ;)

Short and complete example:
Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main()
{
sf::Window App(sf::VideoMode(100, 100), "TextEntered Bug?");
App.EnableKeyRepeat(false);

while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::TextEntered)
std::cout << "TextEntered!" << std::endl;
else if (Event.Type == sf::Event::Closed)
App.Close();
}
App.Display();
}
}
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::Event::TextEntered - key repeat bug?
« Reply #1 on: October 31, 2009, 12:42:21 am »
Absolutely. I'll fix this tomorrow ;)

Thanks for your feedback.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::Event::TextEntered - key repeat bug?
« Reply #2 on: October 31, 2009, 05:24:36 pm »
It's fixed in trunk (I haven't synchronized the sfml2 branch yet).
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6274
  • Thor Developer
    • View Profile
    • Bromeon
sf::Event::TextEntered - key repeat bug?
« Reply #3 on: October 31, 2009, 08:13:54 pm »
Thanks a lot for the fast bugfix! :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: