diff --git a/.gitmodules b/.gitmodules index 2d90e46..0b0fd00 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "lib/imgui"] path = lib/imgui url = https://github.com/ocornut/imgui.git +[submodule "lib/clipboard_lite"] + path = lib/clipboard_lite + url = https://github.com/smasherprog/clipboard_lite diff --git a/include/CinderImGui.h b/include/CinderImGui.h index a93d81a..35dd650 100644 --- a/include/CinderImGui.h +++ b/include/CinderImGui.h @@ -210,10 +210,10 @@ namespace ImGui { bool DragInt3(const char* label, T *object, ci::ivec3( T::*get )() const, void( T::*set )( const ci::ivec3& ), float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f" ); template bool DragInt4(const char* label, T *object, ci::ivec4( T::*get )() const, void( T::*set )( const ci::ivec4& ), float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f" ); - template - bool ColorPicker3( const char* label, T *object, ci::Color( T::*get )() const, void( T::*set )( const ci::Color& ) ); - template - bool ColorPicker4( const char* label, T *object, ci::ColorA( T::*get )() const, void( T::*set )( const ci::ColorA& ) ); + // template + // bool ColorPicker3( const char* label, T *object, ci::Color( T::*get )() const, void( T::*set )( const ci::Color& ) ); + // template + // bool ColorPicker4( const char* label, T *object, ci::ColorA( T::*get )() const, void( T::*set )( const ci::ColorA& ) ); // Scoped objects goodness (push the state when created and pop it when destroyed) @@ -411,4 +411,4 @@ namespace ImGui { } return false; } -} \ No newline at end of file +} diff --git a/lib/clipboard_lite b/lib/clipboard_lite new file mode 160000 index 0000000..5b26bb9 --- /dev/null +++ b/lib/clipboard_lite @@ -0,0 +1 @@ +Subproject commit 5b26bb9aae85a70b477d2cf775ff350cb905ad56 diff --git a/lib/imgui b/lib/imgui index df8a9c4..945f4d1 160000 --- a/lib/imgui +++ b/lib/imgui @@ -1 +1 @@ -Subproject commit df8a9c49eb6d9f134411eeffa0441f561aec3967 +Subproject commit 945f4d1ecd5806268de9674c3753feb7911fb935 diff --git a/proj/cmake/Cinder-ImGuiConfig.cmake b/proj/cmake/Cinder-ImGuiConfig.cmake index 6e129b2..4bac35a 100644 --- a/proj/cmake/Cinder-ImGuiConfig.cmake +++ b/proj/cmake/Cinder-ImGuiConfig.cmake @@ -1,28 +1,31 @@ -if( NOT TARGET Cinder-ImGui ) - get_filename_component( IMGUI_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE ) +if (NOT TARGET Cinder-ImGui) + get_filename_component(IMGUI_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) + list(APPEND IMGUI_SOURCES + ${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_demo.cpp + ) + add_library(Cinder-ImGui + ${IMGUI_SOURCES} + ) - list( APPEND IMGUI_SOURCES - ${IMGUI_ROOT_PATH}/src/CinderImGui.cpp - ${IMGUI_ROOT_PATH}/lib/imgui/imgui.cpp - ${IMGUI_ROOT_PATH}/lib/imgui/imgui_draw.cpp - ) + list(APPEND IMGUI_INCLUDE_DIRS + ${IMGUI_ROOT_PATH}/include + ${IMGUI_ROOT_PATH}/lib/imgui + ) - add_library( Cinder-ImGui ${IMGUI_SOURCES} ) + target_include_directories(Cinder-ImGui PUBLIC + ${IMGUI_INCLUDE_DIRS} + ) - list( APPEND IMGUI_INCLUDE_DIRS - ${IMGUI_ROOT_PATH}/include - ${IMGUI_ROOT_PATH}/lib/imgui - ) - - target_include_directories( Cinder-ImGui PUBLIC "${IMGUI_INCLUDE_DIRS}" ) + if (NOT TARGET cinder) + include("${CINDER_PATH}/proj/cmake/configure.cmake") + find_package(cinder REQUIRED PATHS + "${CINDER_PATH}/${CINDER_LIB_DIRECTORY}" + "$ENV{CINDER_PATH}/${CINDER_LIB_DIRECTORY}") + endif () - if( NOT TARGET cinder ) - include( "${CINDER_PATH}/proj/cmake/configure.cmake" ) - find_package( cinder REQUIRED PATHS - "${CINDER_PATH}/${CINDER_LIB_DIRECTORY}" - "$ENV{CINDER_PATH}/${CINDER_LIB_DIRECTORY}" ) - endif() - - target_link_libraries( Cinder-ImGui PRIVATE cinder ) - -endif() + target_link_libraries(Cinder-ImGui PRIVATE cinder) + +endif () diff --git a/samples/Basic/linux/CMakeLists.txt b/samples/Basic/linux/CMakeLists.txt index 3db04b9..3237853 100644 --- a/samples/Basic/linux/CMakeLists.txt +++ b/samples/Basic/linux/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE on ) -get_filename_component( CINDER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) -include( ${CINDER_DIR}/linux/cmake/Cinder.cmake ) +get_filename_component( CINDER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../Cinder" ABSOLUTE ) +include( ${CINDER_DIR}/proj/cmake/Cinder.cmake ) project( Basic ) diff --git a/src/CinderImGui.cpp b/src/CinderImGui.cpp index 37bb072..87c6223 100644 --- a/src/CinderImGui.cpp +++ b/src/CinderImGui.cpp @@ -546,8 +546,8 @@ ImFont* Renderer::addFont( const ci::fs::path &font, float size, const ImWchar* for( const ImWchar* range = glyph_ranges; range[0] && range[1]; range += 2 ) { ranges.push_back( range[0] ); ranges.push_back( range[1] ); - ranges.push_back( 0 ); } + ranges.push_back( 0 ); glyphRanges = ranges.data(); } // otherwise get them from the font