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

Author Topic: wxWidgets and sf::Input  (Read 2196 times)

0 Members and 1 Guest are viewing this topic.

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
wxWidgets and sf::Input
« on: March 26, 2009, 05:47:58 am »
I'm using wxSFMLCanvas with wxWidgets. Drawing works great, but I'm having trouble getting input to work.

If I manually call wxWindow::CaptureMouse(), then mouse input will work, but it block mouse input to other controls.

I've noticed that I can't get the canvas to even accept focus.

Any help would be greatly appreciated.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
wxWidgets and sf::Input
« Reply #1 on: March 26, 2009, 07:50:52 am »
What if you use wxWidgets input/event handling rather than SFML's one ?
Laurent Gomila - SFML developer

Imbue

  • Full Member
  • ***
  • Posts: 104
    • View Profile
wxWidgets and sf::Input
« Reply #2 on: March 26, 2009, 08:47:58 am »
Thanks for the quick reply.

I'm sure that would work, but it seems like a bit of a hack. Besides, sf::Input is much nicer for what I'm doing, and I've already written a lot of code for it.

I think it should be possible for sf::Input to work with wxWidgets, I just need to figure out how. I still can't get the canvas control to accept focus, and I've tried everything I can think of.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
wxWidgets and sf::Input
« Reply #3 on: March 26, 2009, 10:29:45 am »
Yeah, sometimes it's just a flag to set :)

Unfortunately, I can't help much about this, I haven't used wxWidgets for a long time.
Laurent Gomila - SFML developer