From 4b57fe1fb1401bab9439a639bd842ca61386fe22 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 Date: Mon, 18 Apr 2022 17:54:29 -0700 Subject: Implement IresSpritesheet --- source/EditorUtils.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/EditorUtils.hpp') 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 #include -#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 -- cgit v1.2.3-70-g09d2