mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 06:26:35 +00:00
Merge branch 'master' into docking
# Conflicts: # imgui.cpp # imgui_internal.h
This commit is contained in:
commit
7fbd72b735
10
imgui.cpp
10
imgui.cpp
@ -1009,7 +1009,7 @@ CODE
|
||||
// Debug options
|
||||
#define IMGUI_DEBUG_NAV_SCORING 0 // Display navigation scoring preview when hovering items. Display last moving direction matches when holding CTRL
|
||||
#define IMGUI_DEBUG_NAV_RECTS 0 // Display the reference navigation rectangle for each window
|
||||
#define IMGUI_DEBUG_DOCKING_INI 0 // Save additional comments in .ini file (makes saving slower)
|
||||
#define IMGUI_DEBUG_INI_SETTINGS 0 // Save additional comments in .ini file (particularly helps for Docking, but makes saving slower)
|
||||
|
||||
// Visual Studio warnings
|
||||
#ifdef _MSC_VER
|
||||
@ -10003,8 +10003,12 @@ ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name)
|
||||
ImGuiContext& g = *GImGui;
|
||||
g.SettingsWindows.push_back(ImGuiWindowSettings());
|
||||
ImGuiWindowSettings* settings = &g.SettingsWindows.back();
|
||||
if (const char* p = strstr(name, "###")) // Skip to the "###" marker if any. We don't skip past to match the behavior of GetID()
|
||||
#if !IMGUI_DEBUG_INI_SETTINGS
|
||||
// Skip to the "###" marker if any. We don't skip past to match the behavior of GetID()
|
||||
// Preserve the full string when IMGUI_DEBUG_INI_SETTINGS is set to make .ini inspection easier.
|
||||
if (const char* p = strstr(name, "###"))
|
||||
name = p;
|
||||
#endif
|
||||
settings->Name = ImStrdup(name);
|
||||
settings->ID = ImHashStr(name);
|
||||
return settings;
|
||||
@ -14236,7 +14240,7 @@ static void ImGui::DockSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettings
|
||||
if (node_settings->SelectedTabID)
|
||||
buf->appendf(" SelectedTab=0x%08X", node_settings->SelectedTabID);
|
||||
|
||||
#if IMGUI_DEBUG_DOCKING_INI
|
||||
#if IMGUI_DEBUG_INI_SETTINGS
|
||||
// [DEBUG] Include comments in the .ini file to ease debugging
|
||||
if (ImGuiDockNode* node = DockContextFindNodeByID(ctx, node_settings->ID))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user