diff options
Diffstat (limited to 'source/EditorUtils.hpp')
-rw-r--r-- | source/EditorUtils.hpp | 15 |
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 |