remove flow libs, dependency on nodes lib
This commit is contained in:
28
main.cpp
28
main.cpp
@ -14,7 +14,7 @@
|
||||
#include "lib/backends/imgui_impl_opengl3.h"
|
||||
#include "lib/backends/imgui_impl_sdl2.h"
|
||||
#include "lib/imgui.h"
|
||||
#include "lib/nodes/load_image.h"
|
||||
#include "lib/imgui_internal.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
@ -36,9 +36,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include "lib/ImNodeFlow.h"
|
||||
|
||||
static bool init = true;
|
||||
|
||||
// Main code
|
||||
@ -131,7 +128,6 @@ int main(int, char **) {
|
||||
ImGui_ImplOpenGL3_Init(glsl_version);
|
||||
|
||||
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
||||
ImFlow::ImNodeFlow editor = ImFlow::ImNodeFlow("Nodes");
|
||||
|
||||
// Main loop
|
||||
bool done = false;
|
||||
@ -172,6 +168,7 @@ int main(int, char **) {
|
||||
ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f));
|
||||
ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize);
|
||||
#endif
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
|
||||
ImGui::Begin("Main", NULL,
|
||||
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoResize);
|
||||
@ -179,6 +176,7 @@ int main(int, char **) {
|
||||
ImGuiDockNodeFlags dockspace_flags =
|
||||
ImGuiDockNodeFlags_PassthruCentralNode;
|
||||
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f));
|
||||
|
||||
if (init) {
|
||||
init = false;
|
||||
ImGui::DockBuilderRemoveNode(dockspace_id);
|
||||
@ -188,22 +186,12 @@ int main(int, char **) {
|
||||
ImGui::DockBuilderDockWindow("Editor", dockspace_id);
|
||||
ImGui::DockBuilderFinish(dockspace_id);
|
||||
}
|
||||
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
if (ImGui::BeginMenu("Add")) {
|
||||
if (ImGui::MenuItem("Load image")) {
|
||||
editor.addNode<LoadImage>(ImVec2(10, 10));
|
||||
if (ImGui::BeginMenu("File")) {
|
||||
if (ImGui::MenuItem("Open")) {
|
||||
}
|
||||
if (ImGui::MenuItem("Preview")) {
|
||||
editor.addNode<PreviewImage>(ImVec2(10, 10));
|
||||
}
|
||||
if (ImGui::MenuItem("Simple Brightness")) {
|
||||
editor.addNode<SimpleBrightness>(ImVec2(10, 10));
|
||||
}
|
||||
if (ImGui::MenuItem("Contrast")) {
|
||||
editor.addNode<Contrast>(ImVec2(10, 10));
|
||||
}
|
||||
if (ImGui::MenuItem("Exposure")) {
|
||||
editor.addNode<Exposure>(ImVec2(10, 10));
|
||||
if (ImGui::MenuItem("Exit")) {
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
@ -212,7 +200,7 @@ int main(int, char **) {
|
||||
|
||||
ImGui::Begin("Editor", NULL,
|
||||
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoResize);
|
||||
editor.update();
|
||||
// -- MAIN WINDOW HERE
|
||||
ImGui::End();
|
||||
ImGui::End();
|
||||
ImGui::PopStyleVar();
|
||||
|
Reference in New Issue
Block a user