From 9aae21483aab045b0f477fb699a23bc87f3c48ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20HAMOT?= Date: Thu, 27 Sep 2018 12:59:22 +0200 Subject: [PATCH] Fix missing IMGUI_API and mismatching namespace internal's CreateNewWindowSettings (#2105) --- imgui.cpp | 6 +++--- imgui.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 3245ac2e..2b44d555 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8473,7 +8473,7 @@ void ImGui::MarkIniSettingsDirty(ImGuiWindow* window) g.SettingsDirtyTimer = g.IO.IniSavingRate; } -static ImGuiWindowSettings* CreateNewWindowSettings(const char* name) +static ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name) { ImGuiContext& g = *GImGui; g.SettingsWindows.push_back(ImGuiWindowSettings()); @@ -8611,7 +8611,7 @@ static void* SettingsHandlerWindow_ReadOpen(ImGuiContext*, ImGuiSettingsHandler* { ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHash(name, 0)); if (!settings) - settings = CreateNewWindowSettings(name); + settings = ImGui::CreateNewWindowSettings(name); return (void*)settings; } @@ -8639,7 +8639,7 @@ static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSetting ImGuiWindowSettings* settings = (window->SettingsIdx != -1) ? &g.SettingsWindows[window->SettingsIdx] : ImGui::FindWindowSettings(window->ID); if (!settings) { - settings = CreateNewWindowSettings(window->Name); + settings = ImGui::CreateNewWindowSettings(window->Name); window->SettingsIdx = g.SettingsWindows.index_from_pointer(settings); } IM_ASSERT(settings->ID == window->ID); diff --git a/imgui.h b/imgui.h index 616a805e..35ca416f 100644 --- a/imgui.h +++ b/imgui.h @@ -1456,7 +1456,7 @@ struct ImGuiInputTextCallbackData // Helper functions for text manipulation. // Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection. - ImGuiInputTextCallbackData(); + IMGUI_API ImGuiInputTextCallbackData(); IMGUI_API void DeleteChars(int pos, int bytes_count); IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); bool HasSelection() const { return SelectionStart != SelectionEnd; }