MCPcopy Create free account
hub / github.com/Raais/ImStudio / WindowSettingsHandler_ReadLine

Function WindowSettingsHandler_ReadLine

src/third-party/imgui/imgui.cpp:11717–11725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11715}
11716
11717static void WindowSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entry, const char* line)
11718{
11719 ImGuiWindowSettings* settings = (ImGuiWindowSettings*)entry;
11720 int x, y;
11721 int i;
11722 if (sscanf(line, "Pos=%i,%i", &x, &y) == 2) { settings->Pos = ImVec2ih((short)x, (short)y); }
11723 else if (sscanf(line, "Size=%i,%i", &x, &y) == 2) { settings->Size = ImVec2ih((short)x, (short)y); }
11724 else if (sscanf(line, "Collapsed=%d", &i) == 1) { settings->Collapsed = (i != 0); }
11725}
11726
11727// Apply to existing windows (if any)
11728static void WindowSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*)

Callers

nothing calls this directly

Calls 1

ImVec2ihClass · 0.85

Tested by

no test coverage detected