mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-29 04:35:49 +03:00
Added FindOrCreateWindowSettings() internal helper.
This commit is contained in:
parent
18ffb7dd86
commit
93896d550e
2 changed files with 8 additions and 0 deletions
|
|
@ -12317,6 +12317,13 @@ ImGuiWindowSettings* ImGui::FindWindowSettings(ImGuiID id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ImGuiWindowSettings* ImGui::FindOrCreateWindowSettings(const char* name)
|
||||
{
|
||||
if (ImGuiWindowSettings* settings = FindWindowSettings(ImHash(name, 0)))
|
||||
return settings;
|
||||
return CreateNewWindowSettings(name);
|
||||
}
|
||||
|
||||
void ImGui::LoadIniSettingsFromDisk(const char* ini_filename)
|
||||
{
|
||||
size_t file_data_size = 0;
|
||||
|
|
|
|||
|
|
@ -1406,6 +1406,7 @@ namespace ImGui
|
|||
IMGUI_API void MarkIniSettingsDirty(ImGuiWindow* window);
|
||||
IMGUI_API ImGuiWindowSettings* CreateNewWindowSettings(const char* name);
|
||||
IMGUI_API ImGuiWindowSettings* FindWindowSettings(ImGuiID id);
|
||||
IMGUI_API ImGuiWindowSettings* FindOrCreateWindowSettings(const char* name);
|
||||
IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name);
|
||||
|
||||
// Basic Accessors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue