Browse Source

disable nfd dialogs because nfd's build is fucking trash

master
gradient 8 years ago
parent
commit
59f984361d
4 changed files with 5 additions and 10 deletions
  1. +0
    -3
      .gitmodules
  2. +2
    -2
      CMakeLists.txt
  3. +0
    -1
      deps/nfd
  4. +3
    -4
      src/gui.cpp

+ 0
- 3
.gitmodules View File

@ -7,9 +7,6 @@
[submodule "deps/cpptoml"] [submodule "deps/cpptoml"]
path = deps/cpptoml path = deps/cpptoml
url = https://github.com/skystrife/cpptoml url = https://github.com/skystrife/cpptoml
[submodule "deps/nfd"]
path = deps/nfd
url = https://github.com/mlabbe/nativefiledialog
[submodule "deps/filesystem"] [submodule "deps/filesystem"]
path = deps/filesystem path = deps/filesystem
url = https://github.com/wjakob/filesystem url = https://github.com/wjakob/filesystem

+ 2
- 2
CMakeLists.txt View File

@ -20,7 +20,7 @@ include_directories(deps/gl3w/include)
add_library(gl3w deps/gl3w/src/gl3w.c) add_library(gl3w deps/gl3w/src/gl3w.c)
target_link_libraries(gl3w dl) target_link_libraries(gl3w dl)
include_directories(deps/nfd/src/include)
#include_directories(deps/nfd/src/include)
include_directories(deps/cpptoml/include) include_directories(deps/cpptoml/include)
include_directories(deps/filesystem) include_directories(deps/filesystem)
@ -33,4 +33,4 @@ target_link_libraries(zinnia ${OPENGL_LIBRARIES})
target_link_libraries(zinnia ${GLFW_LIBRARIES}) target_link_libraries(zinnia ${GLFW_LIBRARIES})
target_link_libraries(zinnia gl3w) target_link_libraries(zinnia gl3w)
target_link_libraries(zinnia ${GTK3_LIBRARIES}) target_link_libraries(zinnia ${GTK3_LIBRARIES})
target_link_libraries(zinnia ${CMAKE_SOURCE_DIR}/deps/nfd/build/lib/Release/x64/libnfd.a)
#target_link_libraries(zinnia ${CMAKE_SOURCE_DIR}/deps/nfd/build/lib/Release/x64/libnfd.a)

+ 0
- 1
deps/nfd

@ -1 +0,0 @@
Subproject commit 5cfe5002eb0fac1e49777a17dec70134147931e2

+ 3
- 4
src/gui.cpp View File

@ -2,7 +2,6 @@
#include <iostream> #include <iostream>
#include <assert.h> #include <assert.h>
#include <imgui.h> #include <imgui.h>
#include <nfd.h>
#include "gui.h" #include "gui.h"
#include "project.h" #include "project.h"
@ -51,7 +50,7 @@ void Gui::render_project_overlay() {
void Gui::render_mmb_file() { void Gui::render_mmb_file() {
if (ImGui::MenuItem("Load project", "CTRL+O")) { if (ImGui::MenuItem("Load project", "CTRL+O")) {
nfdchar_t *out_path = nullptr;
/*nfdchar_t *out_path = nullptr;
nfdresult_t result = NFD_OpenDialog(NULL, NULL, &out_path); nfdresult_t result = NFD_OpenDialog(NULL, NULL, &out_path);
if (result == NFD_OKAY) { if (result == NFD_OKAY) {
// Load project // Load project
@ -61,7 +60,7 @@ void Gui::render_mmb_file() {
free(out_path); free(out_path);
} else if (result == NFD_ERROR) { } else if (result == NFD_ERROR) {
std::cout << "Error in filepicker: " << NFD_GetError() << '\n'; std::cout << "Error in filepicker: " << NFD_GetError() << '\n';
}
}*/
} }
ImGui::Separator(); ImGui::Separator();
@ -86,7 +85,7 @@ void Gui::render_mmb_view() {
void Gui::render_mmb_debug() { void Gui::render_mmb_debug() {
ImGui::MenuItem("Profiler"); ImGui::MenuItem("Profiler");
if (ImGui::MenuItem("Reload shaders", "CTRL+R")) { if (ImGui::MenuItem("Reload shaders", "CTRL+R")) {
if (state->current_project != nullptr) { if (state->current_project != nullptr) {
if (state->current_project->scene_loaded) { if (state->current_project->scene_loaded) {


Loading…
Cancel
Save