Clearing ImGuiState, may switch back to memset(0) but that would put a requirement on user defined ImVector<> to be zero-fill compat

This commit is contained in:
ocornut 2015-02-21 11:49:12 +00:00
parent 4deeaea93c
commit 87a3522eb2

View File

@ -1031,6 +1031,10 @@ struct ImGuiState
ImGuiState() ImGuiState()
{ {
Initialized = false; Initialized = false;
Font = NULL;
FontSize = 0.0f;
FontTexUvWhitePixel = ImVec2(0.0f, 0.0f);
Time = 0.0f; Time = 0.0f;
FrameCount = 0; FrameCount = 0;
FrameCountRendered = -1; FrameCountRendered = -1;
@ -1038,6 +1042,9 @@ struct ImGuiState
FocusedWindow = NULL; FocusedWindow = NULL;
HoveredWindow = NULL; HoveredWindow = NULL;
HoveredRootWindow = NULL; HoveredRootWindow = NULL;
HoveredId = 0;
ActiveId = 0;
ActiveIdPreviousFrame = 0;
ActiveIdIsAlive = false; ActiveIdIsAlive = false;
SettingsDirtyTimer = 0.0f; SettingsDirtyTimer = 0.0f;
SetNextWindowPosVal = ImVec2(0.0f, 0.0f); SetNextWindowPosVal = ImVec2(0.0f, 0.0f);
@ -1046,15 +1053,21 @@ struct ImGuiState
SetNextWindowSizeCond = 0; SetNextWindowSizeCond = 0;
SetNextWindowCollapsedVal = false; SetNextWindowCollapsedVal = false;
SetNextWindowCollapsedCond = 0; SetNextWindowCollapsedCond = 0;
SliderAsInputTextId = 0; SliderAsInputTextId = 0;
ActiveComboID = 0; ActiveComboID = 0;
memset(Tooltip, 0, sizeof(Tooltip)); memset(Tooltip, 0, sizeof(Tooltip));
PrivateClipboard = NULL; PrivateClipboard = NULL;
LogEnabled = false; LogEnabled = false;
LogFile = NULL; LogFile = NULL;
LogClipboard = NULL;
LogStartDepth = 0; LogStartDepth = 0;
LogAutoExpandMaxDepth = 2; LogAutoExpandMaxDepth = 2;
LogClipboard = NULL;
memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));
FramerateSecPerFrameIdx = 0;
FramerateSecPerFrameAccum = 0.0f;
} }
}; };