mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS.
This commit is contained in:
parent
08572189f0
commit
07efd7cc20
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -313,12 +313,12 @@ jobs:
|
||||
EOF
|
||||
g++ -I. -std=c++11 -Wall -Wformat -o example_single_file example_single_file.cpp
|
||||
|
||||
- name: Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_METRICS_WINDOW)
|
||||
- name: Build example_null (with IMGUI_DISABLE_DEMO_WINDOWS and IMGUI_DISABLE_DEBUG_TOOLS)
|
||||
run: |
|
||||
cat > example_single_file.cpp <<'EOF'
|
||||
|
||||
#define IMGUI_DISABLE_DEMO_WINDOWS
|
||||
#define IMGUI_DISABLE_METRICS_WINDOW
|
||||
#define IMGUI_DISABLE_DEBUG_TOOLS
|
||||
#define IMGUI_IMPLEMENTATION
|
||||
#include "misc/single_file/imgui_single_file.h"
|
||||
#include "examples/example_null/main.cpp"
|
||||
|
@ -37,6 +37,8 @@ HOW TO UPDATE?
|
||||
|
||||
Breaking changes:
|
||||
|
||||
- Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS for correctness.
|
||||
Kept support for old define (will obsolete).
|
||||
- Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse()
|
||||
and SetNextFrameWantCaptureKeyboard() to clarify purpose, old name was too misleading.
|
||||
Kept inline redirection functions (will obsolete).
|
||||
|
@ -30,11 +30,11 @@
|
||||
//#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.
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
||||
//---- 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.
|
||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
|
||||
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88).
|
||||
|
||||
//---- Don't implement some functions to reduce linkage requirements.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
||||
|
@ -387,6 +387,7 @@ CODE
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2022/06/15 (1.88) - renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS for correctness. kept support for old define (will obsolete).
|
||||
- 2022/05/03 (1.88) - backends: osx: removed ImGui_ImplOSX_HandleEvent() from backend API in favor of backend automatically handling event capture. All ImGui_ImplOSX_HandleEvent() calls should be removed as they are now unnecessary.
|
||||
- 2022/04/05 (1.88) - inputs: renamed ImGuiKeyModFlags to ImGuiModFlags. Kept inline redirection enums (will obsolete). This was never used in public API functions but technically present in imgui.h and ImGuiIO.
|
||||
- 2022/01/20 (1.87) - inputs: reworded gamepad IO.
|
||||
@ -7840,7 +7841,7 @@ void ImGui::SetNextFrameWantCaptureMouse(bool want_capture_mouse)
|
||||
g.WantCaptureMouseNextFrame = want_capture_mouse ? 1 : 0;
|
||||
}
|
||||
|
||||
#ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
static const char* GetInputSourceName(ImGuiInputSource source)
|
||||
{
|
||||
const char* input_source_names[] = { "None", "Mouse", "Keyboard", "Gamepad", "Nav", "Clipboard" };
|
||||
@ -12182,7 +12183,7 @@ static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport*, ImGuiPlatformImeDat
|
||||
// - DebugNodeWindowsListByBeginStackParent() [Internal]
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
|
||||
void ImGui::DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb)
|
||||
{
|
||||
@ -13426,7 +13427,7 @@ void ImGui::DebugHookIdInfo(ImGuiID, ImGuiDataType, const void*, const void*) {}
|
||||
void ImGui::UpdateDebugToolItemPicker() {}
|
||||
void ImGui::UpdateDebugToolStackQueries() {}
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#endif // #ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
10
imgui.h
10
imgui.h
@ -65,7 +65,7 @@ Index of this file:
|
||||
// Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
||||
#define IMGUI_VERSION "1.88 WIP"
|
||||
#define IMGUI_VERSION_NUM 18729
|
||||
#define IMGUI_VERSION_NUM 18730
|
||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
||||
#define IMGUI_HAS_TABLE
|
||||
|
||||
@ -3037,6 +3037,14 @@ enum ImGuiKeyModFlags_ { ImGuiKeyModFlags_None = ImGuiModFlags_None, ImGuiKeyMod
|
||||
|
||||
#endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
||||
// RENAMED IMGUI_DISABLE_METRICS_WINDOW > IMGUI_DISABLE_DEBUG_TOOLS in 1.88 (from June 2022)
|
||||
#if defined(IMGUI_DISABLE_METRICS_WINDOW) && !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(IMGUI_DISABLE_DEBUG_TOOLS)
|
||||
#define IMGUI_DISABLE_DEBUG_TOOLS
|
||||
#endif
|
||||
#if defined(IMGUI_DISABLE_METRICS_WINDOW) && defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS)
|
||||
#error IMGUI_DISABLE_METRICS_WINDOW was renamed to IMGUI_DISABLE_DEBUG_TOOLS, please use new name.
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__clang__)
|
||||
|
@ -401,11 +401,14 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
if (ImGui::BeginMenu("Tools"))
|
||||
{
|
||||
IMGUI_DEMO_MARKER("Menu/Tools");
|
||||
#ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
ImGui::MenuItem("Metrics/Debugger", NULL, &show_app_metrics);
|
||||
ImGui::MenuItem("Debug Log", NULL, &show_app_debug_log);
|
||||
ImGui::MenuItem("Stack Tool", NULL, &show_app_stack_tool);
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
const bool has_debug_tools = true;
|
||||
#else
|
||||
const bool has_debug_tools = false;
|
||||
#endif
|
||||
ImGui::MenuItem("Metrics/Debugger", NULL, &show_app_metrics, has_debug_tools);
|
||||
ImGui::MenuItem("Debug Log", NULL, &show_app_debug_log, has_debug_tools);
|
||||
ImGui::MenuItem("Stack Tool", NULL, &show_app_stack_tool, has_debug_tools);
|
||||
ImGui::MenuItem("Style Editor", NULL, &show_app_style_editor);
|
||||
ImGui::MenuItem("About Dear ImGui", NULL, &show_app_about);
|
||||
ImGui::EndMenu();
|
||||
|
@ -3520,7 +3520,7 @@ void ImGui::TableGcCompactSettings()
|
||||
// - DebugNodeTable() [Internal]
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
|
||||
static const char* DebugNodeTableGetSizingPolicyDesc(ImGuiTableFlags sizing_policy)
|
||||
{
|
||||
@ -3614,7 +3614,7 @@ void ImGui::DebugNodeTableSettings(ImGuiTableSettings* settings)
|
||||
TreePop();
|
||||
}
|
||||
|
||||
#else // #ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#else // #ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
|
||||
void ImGui::DebugNodeTable(ImGuiTable*) {}
|
||||
void ImGui::DebugNodeTableSettings(ImGuiTableSettings*) {}
|
||||
|
@ -4863,7 +4863,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
|
||||
void ImGui::DebugNodeInputTextState(ImGuiInputTextState* state)
|
||||
{
|
||||
#ifndef IMGUI_DISABLE_METRICS_WINDOW
|
||||
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImStb::STB_TexteditState* stb_state = &state->Stb;
|
||||
ImStb::StbUndoState* undo_state = &stb_state->undostate;
|
||||
|
Loading…
Reference in New Issue
Block a user