MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / WindowSettingsHandler_ReadLine

Function WindowSettingsHandler_ReadLine

KBotExt/imgui/imgui.cpp:13149–13157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13147}
13148
13149static void WindowSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entry, const char* line)
13150{
13151 ImGuiWindowSettings* settings = (ImGuiWindowSettings*)entry;
13152 int x, y;
13153 int i;
13154 if (sscanf(line, "Pos=%i,%i", &x, &y) == 2) { settings->Pos = ImVec2ih((short)x, (short)y); }
13155 else if (sscanf(line, "Size=%i,%i", &x, &y) == 2) { settings->Size = ImVec2ih((short)x, (short)y); }
13156 else if (sscanf(line, "Collapsed=%d", &i) == 1) { settings->Collapsed = (i != 0); }
13157}
13158
13159// Apply to existing windows (if any)
13160static void WindowSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*)

Callers

nothing calls this directly

Calls 1

ImVec2ihClass · 0.85

Tested by

no test coverage detected