mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Internals: Settings: added ClearWindowSettings(). Extract part of CreateNewWindow() into InitOrLoadWindowSettings().
Designed to that if the window reappear in the session it won't take an additional slot.
This commit is contained in:
@ -1607,6 +1607,7 @@ struct ImGuiWindowSettings
|
||||
ImVec2ih Size;
|
||||
bool Collapsed;
|
||||
bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
|
||||
bool WantDelete; // Set to invalidate/delete the settings entry
|
||||
|
||||
ImGuiWindowSettings() { memset(this, 0, sizeof(*this)); }
|
||||
char* GetName() { return (char*)(this + 1); }
|
||||
@ -2771,6 +2772,7 @@ namespace ImGui
|
||||
IMGUI_API ImGuiWindowSettings* CreateNewWindowSettings(const char* name);
|
||||
IMGUI_API ImGuiWindowSettings* FindWindowSettingsByName(const char* name);
|
||||
IMGUI_API ImGuiWindowSettings* FindWindowSettingsByWindow(ImGuiWindow* window);
|
||||
IMGUI_API void ClearWindowSettings(const char* name);
|
||||
|
||||
// Localization
|
||||
IMGUI_API void LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count);
|
||||
|
Reference in New Issue
Block a user