Skip to content

Commit

Permalink
Set IMGUI_DISABLE_* flags in config, to prevent type conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 6, 2024
1 parent 15b89db commit aa6dc77
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions opengl/DearImGui.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Dear ImGui for DPF
* Copyright (C) 2021 Jean Pierre Cimalando <[email protected]>
* Copyright (C) 2021-2023 Filipe Coelho <[email protected]>
* Copyright (C) 2021-2024 Filipe Coelho <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
Expand All @@ -22,7 +22,6 @@
#include "StandaloneWindow.hpp"

#define IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DISABLE_OBSOLETE_KEYIO

#include "DearImGui/imgui.h"
#include "DearImGuiKnobs/imgui-knobs.h"
Expand Down
4 changes: 2 additions & 2 deletions opengl/DearImGui/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//#define IMGUI_API __declspec( dllimport )

//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.

//---- Disable all of Dear ImGui or don't implement standard windows/tools.
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
Expand Down
4 changes: 2 additions & 2 deletions opengl/DearImGuiColorTextEditor/TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ void TextEditor::Render(const char* aTitle, const ImVec2& aSize, bool aBorder)
if (mHandleKeyboardInputs)
{
HandleKeyboardInputs();
ImGui::PushAllowKeyboardFocus(true);
ImGui::PushTabStop(true);
}

if (mHandleMouseInputs)
Expand All @@ -1146,7 +1146,7 @@ void TextEditor::Render(const char* aTitle, const ImVec2& aSize, bool aBorder)
Render();

if (mHandleKeyboardInputs)
ImGui::PopAllowKeyboardFocus();
ImGui::PopTabStop();

if (!mIgnoreImGuiChild)
ImGui::EndChild();
Expand Down
1 change: 0 additions & 1 deletion tests/imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "Application.hpp"
#include "../opengl/DearImGui.cpp"
#include "../opengl/DearImGuiColorTextEditor.cpp"

START_NAMESPACE_DGL

Expand Down

0 comments on commit aa6dc77

Please sign in to comment.