WIP: Settings up settings menu
> TODO: Fix broken behaiour in the refacto process
This commit is contained in:
@@ -8,11 +8,11 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if(WIN32)
|
||||
set(IMGUI_BACKEND "imgui_impl_dx11.cpp") # DirectX 11 for Windows
|
||||
set(IMGUI_BACKEND "imgui_impl_dx11.cpp") # DirectX 11 for Windows
|
||||
elseif(APPLE)
|
||||
set(IMGUI_BACKEND "imgui_impl_metal.mm") # Metal for macOS
|
||||
set(IMGUI_BACKEND "imgui_impl_metal.mm") # Metal for macOS
|
||||
elseif(UNIX)
|
||||
set(IMGUI_BACKEND "imgui_impl_opengl3.cpp") # OpenGL for Linux
|
||||
set(IMGUI_BACKEND "imgui_impl_opengl3.cpp") # OpenGL for Linux
|
||||
endif()
|
||||
|
||||
# includes
|
||||
@@ -21,25 +21,25 @@ include_directories(./includes)
|
||||
# raylib
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
raylib
|
||||
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
||||
GIT_TAG 5.5
|
||||
GIT_SHALLOW 1
|
||||
raylib
|
||||
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
||||
GIT_TAG 5.5
|
||||
GIT_SHALLOW 1
|
||||
)
|
||||
FetchContent_GetProperties(raylib)
|
||||
if (NOT raylib_POPULATED)
|
||||
set(FETCHCONTENT_QUIET NO)
|
||||
FetchContent_Populate(raylib)
|
||||
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(BUILD_GAMES OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR})
|
||||
set(FETCHCONTENT_QUIET NO)
|
||||
FetchContent_Populate(raylib)
|
||||
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(BUILD_GAMES OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
# imgui
|
||||
FetchContent_Declare(
|
||||
imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG docking
|
||||
imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG docking
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(imgui)
|
||||
@@ -48,9 +48,9 @@ set(imgui_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/imgui-src)
|
||||
|
||||
# rlimgui
|
||||
FetchContent_Declare(
|
||||
rlImGui
|
||||
GIT_REPOSITORY https://github.com/raylib-extras/rlImGui.git
|
||||
GIT_TAG main
|
||||
rlImGui
|
||||
GIT_REPOSITORY https://github.com/raylib-extras/rlImGui.git
|
||||
GIT_TAG main
|
||||
)
|
||||
FetchContent_MakeAvailable(rlImGui)
|
||||
set(rlImGui_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/rlimgui-src)
|
||||
@@ -58,25 +58,26 @@ set(rlImGui_SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/rlimgui-src)
|
||||
|
||||
# nlohmann::json
|
||||
FetchContent_Declare(
|
||||
json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
||||
GIT_TAG v3.11.3
|
||||
json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
||||
GIT_TAG v3.11.3
|
||||
)
|
||||
FetchContent_MakeAvailable(json)
|
||||
|
||||
include_directories(${imgui_SOURCE_DIR} ${rlImGui_SOURCE_DIR})
|
||||
|
||||
set(SRC_CXX_FILES "./src/main.cpp"
|
||||
"./src/rules.cpp"
|
||||
"./src/world.cpp"
|
||||
"./src/render.cpp"
|
||||
set(SRC_CXX_FILES "./src/main.cpp"
|
||||
"./src/rules.cpp"
|
||||
"./src/world.cpp"
|
||||
"./src/render.cpp"
|
||||
"./src/control_menu.cpp"
|
||||
"${rlImGui_SOURCE_DIR}/rlImGui.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_draw.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_widgets.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_tables.cpp"
|
||||
"${imgui_SOURCE_DIR}/backends/${IMGUI_BACKEND}"
|
||||
"./src/settings_menu.cpp"
|
||||
"${rlImGui_SOURCE_DIR}/rlImGui.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_draw.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_widgets.cpp"
|
||||
"${imgui_SOURCE_DIR}/imgui_tables.cpp"
|
||||
"${imgui_SOURCE_DIR}/backends/${IMGUI_BACKEND}"
|
||||
)
|
||||
|
||||
# Setup the example
|
||||
|
||||
Reference in New Issue
Block a user