Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987)

This commit is contained in:
omar
2018-07-30 18:20:25 +02:00
parent d5400d9517
commit a7ac9e8346
3 changed files with 9 additions and 3 deletions

View File

@ -608,6 +608,7 @@ struct ImGuiNextWindowData
struct ImGuiContext
{
bool Initialized;
bool FrameScopeActive; // Set by NewFrame(), cleared by EndFrame()/Render()
bool FontAtlasOwnedByContext; // Io.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
ImGuiIO IO;
ImGuiStyle Style;
@ -761,6 +762,7 @@ struct ImGuiContext
ImGuiContext(ImFontAtlas* shared_font_atlas) : OverlayDrawList(NULL)
{
Initialized = false;
FrameScopeActive = false;
Font = NULL;
FontSize = FontBaseSize = 0.0f;
FontAtlasOwnedByContext = shared_font_atlas ? false : true;