1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

moveChildForeground

This commit is contained in:
SoundSSGood
2024-08-03 17:04:27 +03:00
parent 257fb8c70c
commit 34b824f9ea
5 changed files with 18 additions and 0 deletions

View File

@ -258,6 +258,15 @@ void CIntObject::redraw()
}
}
void CIntObject::moveChildForeground(const CIntObject * childToMove)
{
for(auto child = children.begin(); child != children.end(); child++)
if(*child == childToMove && child != children.end())
{
std::rotate(child, child + 1, children.end());
}
}
bool CIntObject::receiveEvent(const Point & position, int eventType) const
{
return pos.isInside(position);