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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions include/CinderImGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename T>
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<typename T>
bool ColorPicker3( const char* label, T *object, ci::Color( T::*get )() const, void( T::*set )( const ci::Color& ) );
template<typename T>
bool ColorPicker4( const char* label, T *object, ci::ColorA( T::*get )() const, void( T::*set )( const ci::ColorA& ) );
// template<typename T>
// bool ColorPicker3( const char* label, T *object, ci::Color( T::*get )() const, void( T::*set )( const ci::Color& ) );
// template<typename T>
// 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)

Expand Down Expand Up @@ -411,4 +411,4 @@ namespace ImGui {
}
return false;
}
}
}
1 change: 1 addition & 0 deletions lib/clipboard_lite
Submodule clipboard_lite added at 5b26bb
51 changes: 27 additions & 24 deletions proj/cmake/Cinder-ImGuiConfig.cmake
Original file line number Diff line number Diff line change
@@ -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 ()
4 changes: 2 additions & 2 deletions samples/Basic/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down
2 changes: 1 addition & 1 deletion src/CinderImGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down