diff --git a/Assets/Scripts/RaccoonShowcase.cs b/Assets/Scripts/RaccoonShowcase.cs index 75061b82..dc9d914d 100644 --- a/Assets/Scripts/RaccoonShowcase.cs +++ b/Assets/Scripts/RaccoonShowcase.cs @@ -18,7 +18,9 @@ public class RaccoonShowcase : Script private double rotation = 0.0; private Vector3 scale = Vector3.Zero; private double originalScale = 1.0f; + [Tooltip("Sample list of Vector3s.")] public List vecList = new List(new Vector3[] { new Vector3(1, 2, 3), new Vector3(4, 5, 6) }); + [Range(-5, 5)] public List intList = new List(new int[] { 2, 8, 2, 6, 8, 0, 1 }); public List enumList = new List(new Light.Type[] { Light.Type.Point, Light.Type.Directional, Light.Type.Ambient }); public RaccoonShowcase(GameObject gameObj) : base(gameObj) {} diff --git a/SHADE_Engine/src/Editor/SHEditorUI.cpp b/SHADE_Engine/src/Editor/SHEditorUI.cpp index 06c3f5c5..40e08042 100644 --- a/SHADE_Engine/src/Editor/SHEditorUI.cpp +++ b/SHADE_Engine/src/Editor/SHEditorUI.cpp @@ -53,9 +53,12 @@ namespace SHADE /*-----------------------------------------------------------------------------------*/ /* ImGui Wrapper Functions - Organizers */ /*-----------------------------------------------------------------------------------*/ - bool SHEditorUI::CollapsingHeader(const std::string& title) + bool SHEditorUI::CollapsingHeader(const std::string& title, bool* isHovered) { - return ImGui::CollapsingHeader(title.c_str(), ImGuiTreeNodeFlags_DefaultOpen); + const bool OPENED = ImGui::CollapsingHeader(title.c_str(), ImGuiTreeNodeFlags_DefaultOpen); + if (isHovered) + *isHovered = ImGui::IsItemHovered(); + return OPENED; } void SHEditorUI::SameLine() diff --git a/SHADE_Engine/src/Editor/SHEditorUI.h b/SHADE_Engine/src/Editor/SHEditorUI.h index 4f11a025..f450ac0d 100644 --- a/SHADE_Engine/src/Editor/SHEditorUI.h +++ b/SHADE_Engine/src/Editor/SHEditorUI.h @@ -85,8 +85,9 @@ namespace SHADE /// Wraps up ImGui::CollapsingHeader(). /// /// Label for the header. + ///