Fix missing IMGUI_API and mismatching namespace internal's CreateNewWindowSettings (#2105)

This commit is contained in:
Loïc HAMOT 2018-09-27 12:59:22 +02:00 committed by omar
parent 61d94ff88e
commit 9aae21483a
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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; }