Renamed getWidgetsOffset to getChildWidgetsOffset to distinguish it from getWidgetOffset

0.8
Bruno Van de Velde 2015-10-18 15:18:08 +02:00
parent cf890186ea
commit 70d97c265e
5 changed files with 5 additions and 5 deletions

View File

@ -291,7 +291,7 @@ namespace tgui
/// @return Offset of the widgets in the container
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
virtual sf::Vector2f getWidgetsOffset() const
virtual sf::Vector2f getChildWidgetsOffset() const
{
return sf::Vector2f{0, 0};
}

View File

@ -288,7 +288,7 @@ namespace tgui
/// @return Offset of the widgets in the container
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
virtual sf::Vector2f getWidgetsOffset() const override;
virtual sf::Vector2f getChildWidgetsOffset() const override;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -605,7 +605,7 @@ namespace tgui
{
Widget::Ptr toolTip = nullptr;
mousePos -= getPosition() + getWidgetsOffset();
mousePos -= getPosition() + getChildWidgetsOffset();
Widget::Ptr widget = mouseOnWhichWidget(mousePos.x, mousePos.y);
if (widget)

View File

@ -171,7 +171,7 @@ namespace tgui
sf::Vector2f Widget::getAbsolutePosition() const
{
if (m_parent)
return m_parent->getAbsolutePosition() + m_parent->getWidgetsOffset() + getPosition();
return m_parent->getAbsolutePosition() + m_parent->getChildWidgetsOffset() + getPosition();
else
return getPosition();
}

View File

@ -251,7 +251,7 @@ namespace tgui
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
sf::Vector2f ChildWindow::getWidgetsOffset() const
sf::Vector2f ChildWindow::getChildWidgetsOffset() const
{
return {getRenderer()->m_borders.left, getRenderer()->m_borders.top + getRenderer()->m_titleBarHeight};
}