mirror of
https://github.com/SFML/SFML.git
synced 2025-02-07 17:08:02 +08:00
Fixed window size not correctly updated when changed through Window::setSize (#474)
This commit is contained in:
parent
cc3dc29ef4
commit
fe12270d62
@ -274,7 +274,7 @@ public :
|
|||||||
/// \see getSize
|
/// \see getSize
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void setSize(const Vector2u size);
|
void setSize(const Vector2u& size);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Change the title of the window
|
/// \brief Change the title of the window
|
||||||
|
@ -231,10 +231,19 @@ Vector2u Window::getSize() const
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void Window::setSize(const Vector2u size)
|
void Window::setSize(const Vector2u& size)
|
||||||
{
|
{
|
||||||
if (m_impl)
|
if (m_impl)
|
||||||
|
{
|
||||||
m_impl->setSize(size);
|
m_impl->setSize(size);
|
||||||
|
|
||||||
|
// Cache the new size
|
||||||
|
m_size.x = size.x;
|
||||||
|
m_size.y = size.y;
|
||||||
|
|
||||||
|
// Notify the derived class
|
||||||
|
onResize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user