Skip to content

Commit

Permalink
ADAPT_IMGUI_BUNDLE: publish ImGuiWindowSettings::GetNameStr (as string)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Nov 2, 2023
1 parent 377aae4 commit 44b0637
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Index of this file:
// [ADAPT_IMGUI_BUNDLE]
#ifdef IMGUI_BUNDLE_PYTHON_API
#include <functional>
#include <string>
#endif
// [/ADAPT_IMGUI_BUNDLE]

Expand Down Expand Up @@ -1908,7 +1909,16 @@ struct ImGuiWindowSettings
bool WantDelete; // Set to invalidate/delete the settings entry

ImGuiWindowSettings() { memset(this, 0, sizeof(*this)); DockOrder = -1; }

// [ADAPT_IMGUI_BUNDLE]
#ifdef IMGUI_BUNDLE_PYTHON_API
std::string GetNameStr() { return std::string((const char*)(this + 1)); }
#endif
#ifdef IMGUI_BUNDLE_PYTHON_UNSUPPORTED_API
char* GetName() { return (char*)(this + 1); }
#endif
// [/ADAPT_IMGUI_BUNDLE]

};

struct ImGuiSettingsHandler
Expand Down

0 comments on commit 44b0637

Please sign in to comment.