mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-05 09:05:20 +00:00
Settings: minor struct packing.
This commit is contained in:
2
imgui.h
2
imgui.h
@@ -4035,7 +4035,7 @@ struct ImGuiPlatformIO
|
||||
|
||||
// Optional: Platform locale
|
||||
// [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point
|
||||
ImWchar Platform_LocaleDecimalPoint; // '.'
|
||||
ImWchar Platform_LocaleDecimalPoint; // '.'
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Input - Interface with Renderer Backend
|
||||
|
||||
@@ -2014,13 +2014,13 @@ struct ImGuiViewportP : public ImGuiViewport
|
||||
// (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure)
|
||||
struct ImGuiWindowSettings
|
||||
{
|
||||
ImGuiID ID;
|
||||
ImVec2ih Pos;
|
||||
ImVec2ih Size;
|
||||
bool Collapsed;
|
||||
bool IsChild;
|
||||
bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
|
||||
bool WantDelete; // Set to invalidate/delete the settings entry
|
||||
ImGuiID ID;
|
||||
ImVec2ih Pos;
|
||||
ImVec2ih Size;
|
||||
bool Collapsed : 1;
|
||||
bool IsChild : 1;
|
||||
bool WantApply : 1; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
|
||||
bool WantDelete : 1; // Set to invalidate/delete the settings entry
|
||||
|
||||
ImGuiWindowSettings() { memset((void*)this, 0, sizeof(*this)); }
|
||||
char* GetName() { return (char*)(this + 1); }
|
||||
@@ -3203,7 +3203,7 @@ struct ImGuiTableSettings
|
||||
float RefScale; // Reference scale to be able to rescale columns on font/dpi changes.
|
||||
ImGuiTableColumnIdx ColumnsCount;
|
||||
ImGuiTableColumnIdx ColumnsCountMax; // Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
|
||||
bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
|
||||
bool WantApply : 1; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
|
||||
|
||||
ImGuiTableSettings() { memset((void*)this, 0, sizeof(*this)); }
|
||||
ImGuiTableColumnSettings* GetColumnSettings() { return (ImGuiTableColumnSettings*)(this + 1); }
|
||||
|
||||
Reference in New Issue
Block a user