#include "imguibindings.h"


// These variables can be declared extern and set at runtime-----------------------------------------------------
bool gImGuiPaused = false;

// --------------------------------------------------------------------------------------------------------------

#ifndef STBI_INCLUDE_STB_IMAGE_H
#ifndef IMGUI_NO_STB_IMAGE_STATIC
#define STB_IMAGE_STATIC
#endif //IMGUI_NO_STB_IMAGE_STATIC
#ifndef IMGUI_NO_STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#endif //IMGUI_NO_STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#ifndef IMGUI_NO_STB_IMAGE_IMPLEMENTATION
#undef STB_IMAGE_IMPLEMENTATION
#endif //IMGUI_NO_STB_IMAGE_IMPLEMENTATION
#ifndef IMGUI_NO_STB_IMAGE_STATIC
#undef STB_IMAGE_STATIC
#endif //IMGUI_NO_STB_IMAGE_STATIC
#endif //STBI_INCLUDE_STB_IMAGE_H


bool ImImpl_EditSdfParams() {
using namespace ImGui;
bool changed = false;
//#if (defined(IMGUI_USE_AUTO_BINDING_OPENGL) && !defined(IMIMPL_SHADER_NONE))
#ifdef IMIMPL_USE_SDF_SHADER
const float maxValue = 0.75f;
const float step = 0.005f;
#ifdef IMIMPL_USE_SDF_OUTLINE_SHADER
PushItemWidth(GetWindowWidth()*0.15f);
changed|=DragFloat("###ImImpl_EditSdfParams_X",&gImImplPrivateParams.sdfParams.x,step,gImImplPrivateParams.sdfParams.y,maxValue);
if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s","Glyph Extension");
ImGui::SameLine();
changed|=DragFloat("###ImImpl_EditSdfParams_Y",&gImImplPrivateParams.sdfParams.y,step,0.f,gImImplPrivateParams.sdfParams.x);
if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s","Outline Extension");
ImGui::SameLine();
changed|=DragFloat("Global Font Params###ImImpl_EditSdfParams_Z",&gImImplPrivateParams.sdfParams.z,step,0.f,maxValue);
if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s","Outline Darkness");
PopItemWidth();
#else //IMIMPL_USE_SDF_OUTLINE_SHADER
PushItemWidth(GetWindowWidth()*0.5f);
changed|=DragFloat("Global Font Params###ImImpl_EditSdfParams_X",&gImImplPrivateParams.sdfParams.x,step,0.f,maxValue);
if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s","Glyph Extension");
PopItemWidth();
#endif //IMIMPL_USE_SDF_OUTLINE_SHADER
ImGui::SameLine();
if (ImGui::SmallButton("Reset###ImImpl_EditSdfParams_R")) {gImImplPrivateParams.resetSdfParams();changed=true;}
#endif // IMIMPL_USE_SDF_SHADER
//#endif // (defined(IMGUI_USE_AUTO_BINDING_OPENGL) && !defined(IMIMPL_SHADER_NONE))
return changed;
}