aboutsummaryrefslogtreecommitdiff
path: root/source/EditorUtils.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-04-18 17:54:29 -0700
committerrtk0c <[email protected]>2022-04-18 17:54:29 -0700
commit7af9992ca81c699bc1cf05eb691e284bf424f050 (patch)
tree0f9bf191270791d80a28d7df1f1ffd5223158124 /source/EditorUtils.hpp
parent5424a1d5434e3ddd911a504719918c2df027e2fd (diff)
Changeset: 9 Implement IresSpritesheet
Diffstat (limited to 'source/EditorUtils.hpp')
-rw-r--r--source/EditorUtils.hpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/EditorUtils.hpp b/source/EditorUtils.hpp
index 090f7f6..d6483da 100644
--- a/source/EditorUtils.hpp
+++ b/source/EditorUtils.hpp
@@ -5,8 +5,11 @@
#include <imgui.h>
#include <string>
-#define BRUSSEL_DRAG_DROP_SHADER "Shader"
-#define BRUSSEL_DRAG_DROP_MATERIAL "Mat"
+#define BRUSSEL_TAG_Shader "Shader"
+#define BRUSSEL_TAG_Material "Mat"
+// To check whether a payload is of this type, use starts_with()
+#define BRUSSEL_TAG_PREFIX_GameObject "GameObject"
+#define BRUSSEL_TAG_PREFIX_Ires "Ires"
namespace ImGui {
@@ -29,3 +32,11 @@ bool ColorPicker4(const char* label, RgbaColor* color, ImGuiColorEditFlags flags
bool Splitter(bool splitVertically, float thickness, float* size1, float* size2, float minSize1, float minSize2, float splitterLongAxisSize = -1.0f);
} // namespace ImGui
+
+namespace Utils {
+
+float CalcImageHeight(glm::vec2 original, int targetWidth);
+float CalcImageWidth(glm::vec2 original, float targetHeight);
+ImVec2 FitImage(glm::vec2 original);
+
+} // namespace Utils