aboutsummaryrefslogtreecommitdiff
path: root/source/EditorUtils.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-04-18 20:59:57 -0700
committerrtk0c <[email protected]>2022-04-18 20:59:57 -0700
commit07e8754e4d799e44678b595177e79e6eaa621268 (patch)
tree6d9d4470259776ef01e814191ba0440f83505933 /source/EditorUtils.cpp
parent7f871b04470766f0f5266cf949b65a54b7a6f79e (diff)
Changeset: 11 Migrate Material to Ires
Diffstat (limited to 'source/EditorUtils.cpp')
-rw-r--r--source/EditorUtils.cpp7
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