Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/imgui
Submodule imgui updated 196 files
1 change: 1 addition & 0 deletions proj/cmake/Cinder-ImGuiConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
1 change: 1 addition & 0 deletions proj/vc2015/Cinder-ImGui.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
<ClCompile Include="..\..\lib\imgui\imgui.cpp" />
<ClCompile Include="..\..\lib\imgui\imgui_demo.cpp" />
<ClCompile Include="..\..\lib\imgui\imgui_draw.cpp" />
<ClCompile Include="..\..\lib\imgui\imgui_widgets.cpp" />
<ClCompile Include="..\..\src\CinderImGui.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
3 changes: 3 additions & 0 deletions proj/vc2015/Cinder-ImGui.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
<ClCompile Include="..\..\lib\imgui\imgui_demo.cpp">
<Filter>Source Files\ImGui</Filter>
</ClCompile>
<ClCompile Include="..\..\lib\imgui\imgui_widgets.cpp">
<Filter>Source Files\ImGui</Filter>
</ClCompile>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions samples/Basic/vc2015/Basic.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
<ItemGroup />
<ItemGroup />
<ItemGroup>
<ClCompile Include="..\..\..\lib\imgui\imgui_widgets.cpp" />
<ClCompile Include="..\src\BasicApp.cpp" />
<ClCompile Include="..\..\..\src\CinderImGui.cpp" />
<ClCompile Include="..\..\..\lib\imgui\imgui.cpp" />
Expand Down
5 changes: 4 additions & 1 deletion samples/Basic/vc2015/Basic.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
<ClCompile Include="..\..\..\lib\imgui\imgui_demo.cpp">
<Filter>Blocks\ImGui\lib\imgui</Filter>
</ClCompile>
<ClCompile Include="..\..\..\lib\imgui\imgui_widgets.cpp">
<Filter>Blocks\ImGui\lib\imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\Resources.h">
Expand All @@ -82,4 +85,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
</Project>
10 changes: 6 additions & 4 deletions src/CinderImGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -562,7 +559,7 @@ ImFont* Renderer::addFont( const ci::fs::path &font, float size, const ImWchar*
// find glyph ranges
mFontsGlyphRanges.push_back( vector<ImWchar>() );
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 );
Expand Down Expand Up @@ -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();

Expand Down