|
|
|
@ -975,6 +975,8 @@ struct ImGuiStorage
|
|
|
|
|
IMGUI_API void Clear();
|
|
|
|
|
IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const;
|
|
|
|
|
IMGUI_API void SetInt(ImGuiID key, int val);
|
|
|
|
|
IMGUI_API bool GetBool(ImGuiID key, bool default_val = false) const;
|
|
|
|
|
IMGUI_API void SetBool(ImGuiID key, bool val);
|
|
|
|
|
IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const;
|
|
|
|
|
IMGUI_API void SetFloat(ImGuiID key, float val);
|
|
|
|
|
IMGUI_API void* GetVoidPtr(ImGuiID key) const; // default_val is NULL
|
|
|
|
@ -986,7 +988,8 @@ struct ImGuiStorage
|
|
|
|
|
// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar;
|
|
|
|
|
// - You can also use this to quickly create temporary editable values during a session of using Edit&Continue, without restarting your application.
|
|
|
|
|
IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0);
|
|
|
|
|
IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0);
|
|
|
|
|
IMGUI_API bool* GetBoolRef(ImGuiID key, bool default_val = false);
|
|
|
|
|
IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0.0f);
|
|
|
|
|
IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL);
|
|
|
|
|
|
|
|
|
|
// Use on your own storage if you know only integer are being stored (open/close all tree nodes)
|
|
|
|
|