Viewport: Better support for toggling ImGuiConfigFlags_ViewportsEnable. (#2196)

This commit is contained in:
omar
2018-11-27 19:45:37 +01:00
parent 1a0d2578a1
commit c08b4b46f4
3 changed files with 19 additions and 17 deletions

View File

@ -711,6 +711,7 @@ struct ImGuiContext
ImGuiIO IO;
ImGuiPlatformIO PlatformIO;
ImGuiStyle Style;
ImGuiConfigFlags ConfigFlagsForFrame; // = g.IO.ConfigFlags at the time of NewFrame()
ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
@ -876,6 +877,7 @@ struct ImGuiContext
{
Initialized = false;
FrameScopeActive = false;
ConfigFlagsForFrame = ImGuiConfigFlags_None;
Font = NULL;
FontSize = FontBaseSize = 0.0f;
FontAtlasOwnedByContext = shared_font_atlas ? false : true;