Add docking of main viewport

- Change ImGui branch to docking
- Rework code to handle viewport resizes instead of window resize
This commit is contained in:
Thraix
2023-07-13 23:41:20 +02:00
parent f9fb74ba6a
commit 65a86bd5a2
21 changed files with 143 additions and 89 deletions
+11 -1
View File
@@ -20,6 +20,16 @@ namespace Copium
glm::vec2 BoundingBox::GetSize() const
{
return rt - lb;
return glm::abs(rt - lb);
}
bool BoundingBox::operator==(const BoundingBox& boundingBox) const
{
return l == boundingBox.l && b == boundingBox.b && r == boundingBox.r && t == boundingBox.t;
}
bool BoundingBox::operator!=(const BoundingBox& boundingBox) const
{
return !(*this == boundingBox);
}
}
@@ -18,5 +18,8 @@ namespace Copium
BoundingBox(glm::vec2 lb, glm::vec2 rt);
glm::vec2 GetSize() const;
bool operator==(const BoundingBox& boundingBox) const;
bool operator!=(const BoundingBox& boundingBox) const;
};
}