ImGuiIniSettings

imgui.ImGuiIniSettings (Class)

Where (and whether) Dear ImGui persists window layout.

By default ImGui reads and writes imgui.ini in the process working directory — which on a packaged app means inside the bundle, and on web means nowhere useful. io.IniFilename cannot be set from the portable API (it is a const char* whose storage ImGui keeps a pointer to), hence this helper: it owns the string on the native side.

An app that persists the layout itself (through its own storage, a database, a game engine's save system...) calls disable() once at startup and then uses ImGui.saveIniSettingsToMemory() / ImGui.loadIniSettingsFromMemory(). With ini file IO off, ImGui raises io.wantSaveIniSettings when the layout changed and there is something worth saving.

Static Members

disable(): Void

Turn off ImGui's own ini file reading and writing. Layout then only persists if the app saves it (see ImGui.saveIniSettingsToMemory).


setFilename(path: String): Void

Point ImGui's ini file at an explicit path (it then loads it on the next frame and saves it on its own, every io.iniSavingRate seconds).

Name Type
path String

Metadata

Name Parameters
:cppInclude "linc_imgui.h"