Skip to content

Commit

Permalink
[ADD] : Convert the UI to the OrangeBlue pretty Theme from https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Feb 21, 2024
1 parent a201273 commit bbe8253
Show file tree
Hide file tree
Showing 9 changed files with 2,234 additions and 128 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ endif ()
add_definitions(${GLFW_DEFINITIONS})
add_definitions(-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS)
add_definitions(-DCUSTOM_IMGUIFILEDIALOG_CONFIG="${CMAKE_SOURCE_DIR}/CustomImGuiFileDialogConfig.h")
add_definitions(-DCUSTOM_IMWIDGETS_CONFIG="${CMAKE_SOURCE_DIR}/CustomImWidgetsConfig.h")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

if (USE_NEW_IMGUI_KEY_SYSTEM)
add_definitions(-DIMGUI_DISABLE_OBSOLETE_KEYIO)
endif()

file(GLOB MAIN_SOURCES ${CMAKE_SOURCE_DIR}/main.cpp)
file(GLOB CUSTOM_SOURCES ${CMAKE_SOURCE_DIR}/CustomImGuiFileDialogConfig.h)
file(GLOB CUSTOM_SOURCES
${CMAKE_SOURCE_DIR}/CustomImGuiFileDialogConfig.h
${CMAKE_SOURCE_DIR}/CustomImWidgetsConfig.h)

if (USE_BOOST_DEMO_FILESYSTEM)
file(GLOB BOOST_SOURCES ${CMAKE_SOURCE_DIR}/FileSystemBoost.hpp)
Expand All @@ -58,16 +61,22 @@ endif()

file(GLOB RES_SOURCES
${CMAKE_SOURCE_DIR}/CustomFont.cpp
${CMAKE_SOURCE_DIR}/CustomFont.h)
${CMAKE_SOURCE_DIR}/CustomFont.h
${CMAKE_SOURCE_DIR}/Roboto_Medium.cpp
${CMAKE_SOURCE_DIR}/Roboto_Medium.h)
file(GLOB RES_WIDGETS
${CMAKE_SOURCE_DIR}/ImWidgets.cpp
${CMAKE_SOURCE_DIR}/ImWidgets.h)
file(GLOB IMGUIIMPL_SOURCES
${CMAKE_SOURCE_DIR}/3rdparty/imgui/backends/imgui_impl_glfw.cpp
${CMAKE_SOURCE_DIR}/3rdparty/imgui/backends/imgui_impl_glfw.h
${CMAKE_SOURCE_DIR}/3rdparty/imgui/backends/imgui_impl_opengl3.cpp
${CMAKE_SOURCE_DIR}/3rdparty/imgui/backends/imgui_impl_opengl3.h)
source_group(main FILES ${MAIN_SOURCES})
source_group(src\\Custom FILES ${CUSTOM_SOURCES})
source_group(src\\Res FILES ${RES_SOURCES})
source_group(src\\ImGuiImpl FILES ${IMGUIIMPL_SOURCES})
source_group(src\\Res FILES ${RES_SOURCES})
source_group(src\\Widgets FILES ${RES_WIDGETS})

if (APPLE)
##set(ICON icon.icns)
Expand Down Expand Up @@ -104,6 +113,7 @@ target_link_libraries(ImGuiFileDialog PRIVATE
add_executable(${PROJECT}
MACOSX_BUNDLE
${RES_SOURCES}
${RES_WIDGETS}
${MAIN_SOURCES}
${BOOST_SOURCES}
${CUSTOM_SOURCES}
Expand Down
11 changes: 8 additions & 3 deletions CustomImGuiFileDialogConfig.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#pragma once

#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif

//#include <imgui.h>
#include <CustomFont.h>
#include <ImWidgets.h>

// uncomment and modify defines under for customize ImGuiFileDialog

Expand Down Expand Up @@ -56,16 +61,16 @@

// widget
// begin combo widget
//#define IMGUI_BEGIN_COMBO ImGui::BeginCombo
#define IMGUI_BEGIN_COMBO ImGui::BeginContrastedCombo
// uncomment if you want to have the combo resized by its content
// when auto resized, FILTER_COMBO_MIN_WIDTH will be considered has minimum width
#define FILTER_COMBO_AUTO_SIZE 1
// filter combobox minimal width
#define FILTER_COMBO_MIN_WIDTH 50.0f
// button widget use for compose path
//#define IMGUI_PATH_BUTTON ImGui::Button
#define IMGUI_PATH_BUTTON ImGui::ContrastedButton_For_Dialogs
// standard button
//#define IMGUI_BUTTON ImGui::Button
#define IMGUI_BUTTON ImGui::ContrastedButton_For_Dialogs

// locales string
#define createDirButtonString ICON_IGFD_ADD
Expand Down
12 changes: 12 additions & 0 deletions CustomImWidgetsConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

// ############################# DISCLAIMER #############################
// ############ THIS WIDGTES LIB IS BASED ON IMGUIPACK ##################
// ############# https://github.com/aiekick/ImGuiPack ###################
// ######################################################################

#include <CustomFont.h>

#define BUTTON_LABEL_RESET ICON_IGFD_RESET
#define BUTTON_LABEL_PLUS ICON_IGFD_ADD
#define BUTTON_LABEL_MINUS ICON_IGFD_REMOVE
Loading

0 comments on commit bbe8253

Please sign in to comment.