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

Author Topic: sf::Event::SizeEvent does not use sf::Vector2u  (Read 3016 times)

0 Members and 1 Guest are viewing this topic.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
sf::Event::SizeEvent does not use sf::Vector2u
« on: September 14, 2012, 07:56:03 pm »
While window sizes are now stored in a sf::Vector2u struct, the sf::Event::SizeEvent struct still uses a pair of integers for width and height. I believe for the sake of consistency, this should be changed.
JSFML - The Java binding to SFML.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: sf::Event::SizeEvent does not use sf::Vector2i
« Reply #1 on: September 14, 2012, 07:58:08 pm »
I have already proposed that, but sf::Vector2u can't be used for technical reasons. In C++98, unions require their members to be POD types, which is true for int, but not for sf::Vector2u.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: sf::Event::SizeEvent does not use sf::Vector2u
« Reply #2 on: September 15, 2012, 10:24:48 am »
Oh right, the event thing is a union. I'm not used to these...
However, I guess in that case it's not a problem if I make it a Vector2i in JSFML then (not unsigned, there is no unsigned in Java ;) ).
JSFML - The Java binding to SFML.

 

anything