private void UpdateControlButtonPosition() { int x = -HideButton.GetWidth() / 2; int y = -HideButton.GetHeight() / 2; x = GetWidth() / 2 + GetX() + x; y = GetHeight() / 2 + GetY() + y; HideButton.SetPosition(x, y); AddButton.SetPosition(x + HideButton.GetWidth() / 2 - AddButton.GetWidth() / 2, y + HideButton.GetHeight() + 10); }