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

Author Topic: SFML and WXWIDGETS integration  (Read 3215 times)

0 Members and 1 Guest are viewing this topic.

Francisco Benavides

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
SFML and WXWIDGETS integration
« on: September 09, 2014, 07:59:26 pm »
The documentation for this issue is a little bit outdated, for WxWidgets 2.x and SFML 1.6
Following the same procedure, I got to make it work, but there seems to be a bug in Windows.cpp

The function is:

Vector2u Window::getSize() const
{
    return m_size;
}

It should be:

Vector2u Window::getSize() const
{
   return m_impl ? m_impl->getSize() : m_size;
}

Did someone else have the same problem ? When I placed a Sprite inside the WxControl, it was not scaled properly. After the change I suggest, everything seems to be ok.

Greetings

Strelok

  • Full Member
  • ***
  • Posts: 139
    • View Profile
    • GitHub
Re: SFML and WXWIDGETS integration
« Reply #1 on: September 09, 2014, 08:11:45 pm »
Sfml 1.6 is like 4 years old don't expect a fix now :D

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFML and WXWIDGETS integration
« Reply #2 on: September 09, 2014, 09:43:09 pm »
It works for 1.6, but doing it the same way is broken for 2.0 (according to OP).
Back to C++ gamedev with SFML in May 2023

Francisco Benavides

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: SFML and WXWIDGETS integration
« Reply #3 on: September 10, 2014, 11:00:00 pm »
The change I showed seems to work
It is not so difficult to solve then

Francisco Benavides

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: SFML and WXWIDGETS integration
« Reply #4 on: September 10, 2014, 11:02:29 pm »
What is the proper way to integrate these two libraries then ?

 

anything