diff options
Diffstat (limited to 'source/EditorUtils.cpp')
-rw-r--r-- | source/EditorUtils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/EditorUtils.cpp b/source/EditorUtils.cpp index 4863301..488d345 100644 --- a/source/EditorUtils.cpp +++ b/source/EditorUtils.cpp @@ -161,6 +161,13 @@ bool ImGui::Splitter(bool splitVertically, float thickness, float* size1, float* return held; } +void ImGui ::AddUnderLine(ImColor col) { + auto min = ImGui::GetItemRectMin(); + auto max = ImGui::GetItemRectMax(); + min.y = max.y; + ImGui::GetWindowDrawList()->AddLine(min, max, col, 1.0f); +} + float Utils::CalcImageHeight(glm::vec2 original, int targetWidth) { // Xorig / Yorig = Xnew / Ynew // Ynew = Xnew * Yorig / Xorig |