diff --git a/lib/imgui b/lib/imgui index df8a9c4..da3c433 160000 --- a/lib/imgui +++ b/lib/imgui @@ -1 +1 @@ -Subproject commit df8a9c49eb6d9f134411eeffa0441f561aec3967 +Subproject commit da3c4330c1c3822cdc59b0c38c7e3c16aa3ef78a diff --git a/proj/cmake/Cinder-ImGuiConfig.cmake b/proj/cmake/Cinder-ImGuiConfig.cmake index 6e129b2..0057c04 100644 --- a/proj/cmake/Cinder-ImGuiConfig.cmake +++ b/proj/cmake/Cinder-ImGuiConfig.cmake @@ -5,6 +5,7 @@ if( NOT TARGET Cinder-ImGui ) ${IMGUI_ROOT_PATH}/src/CinderImGui.cpp ${IMGUI_ROOT_PATH}/lib/imgui/imgui.cpp ${IMGUI_ROOT_PATH}/lib/imgui/imgui_draw.cpp + ${IMGUI_ROOT_PATH}/lib/imgui/imgui_widgets.cpp ) add_library( Cinder-ImGui ${IMGUI_SOURCES} ) diff --git a/proj/vc2015/Cinder-ImGui.vcxproj b/proj/vc2015/Cinder-ImGui.vcxproj index 2b54280..f02d116 100644 --- a/proj/vc2015/Cinder-ImGui.vcxproj +++ b/proj/vc2015/Cinder-ImGui.vcxproj @@ -331,6 +331,7 @@ + diff --git a/proj/vc2015/Cinder-ImGui.vcxproj.filters b/proj/vc2015/Cinder-ImGui.vcxproj.filters index fe96abb..a6bf08c 100644 --- a/proj/vc2015/Cinder-ImGui.vcxproj.filters +++ b/proj/vc2015/Cinder-ImGui.vcxproj.filters @@ -47,5 +47,8 @@ Source Files\ImGui + + Source Files\ImGui + \ No newline at end of file diff --git a/samples/Basic/vc2015/Basic.vcxproj b/samples/Basic/vc2015/Basic.vcxproj index 19b1096..84f8739 100644 --- a/samples/Basic/vc2015/Basic.vcxproj +++ b/samples/Basic/vc2015/Basic.vcxproj @@ -191,6 +191,7 @@ + diff --git a/samples/Basic/vc2015/Basic.vcxproj.filters b/samples/Basic/vc2015/Basic.vcxproj.filters index 627dc85..d244cf8 100644 --- a/samples/Basic/vc2015/Basic.vcxproj.filters +++ b/samples/Basic/vc2015/Basic.vcxproj.filters @@ -71,6 +71,9 @@ Blocks\ImGui\lib\imgui + + Blocks\ImGui\lib\imgui + @@ -82,4 +85,4 @@ Resource Files - + \ No newline at end of file diff --git a/src/CinderImGui.cpp b/src/CinderImGui.cpp index 69322d5..2ad4a51 100644 --- a/src/CinderImGui.cpp +++ b/src/CinderImGui.cpp @@ -281,9 +281,6 @@ ImGui::Options& ImGui::Options::darkTheme() style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.47f, 0.77f, 0.83f, 0.04f); style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.92f, 0.18f, 0.29f, 0.78f); style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f); - style.Colors[ImGuiCol_CloseButton] = ImVec4(0.86f, 0.93f, 0.89f, 0.16f); - style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.86f, 0.93f, 0.89f, 0.39f); - style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.86f, 0.93f, 0.89f, 1.00f); style.Colors[ImGuiCol_PlotLines] = ImVec4(0.86f, 0.93f, 0.89f, 0.63f); style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.92f, 0.18f, 0.29f, 1.00f); style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.86f, 0.93f, 0.89f, 0.63f); @@ -562,7 +559,7 @@ ImFont* Renderer::addFont( const ci::fs::path &font, float size, const ImWchar* // find glyph ranges mFontsGlyphRanges.push_back( vector() ); auto &ranges = mFontsGlyphRanges.back(); - Font::Glyph start = glyphs[0] == 0 ? '0' : glyphs[0]; + Font::Glyph start = glyphs[0] == 0 ? ' ' : glyphs[0]; for( size_t i = 1; i < numGlyphs; ++i ) { if( glyphs[i] != glyphs[i-1] + 1 ) { ranges.push_back( start ); @@ -977,6 +974,11 @@ static signals::ConnectionList sAppConnections; void initialize( const Options &options ) { + if( sInitialized ) { + CI_LOG_W("CinderImGui has already been initialized."); + return; + } + // create one context for now. will update with multiple context / shared fontatlas soon! ImGuiContext* context = ImGui::CreateContext();