Merge branch 'context'

# Conflicts:
#	examples/allegro5_example/main.cpp
#	examples/directx10_example/main.cpp
#	examples/directx11_example/main.cpp
#	examples/directx9_example/main.cpp
#	examples/marmalade_example/main.cpp
#	examples/opengl2_example/main.cpp
#	examples/opengl3_example/main.cpp
#	examples/sdl_opengl2_example/main.cpp
#	examples/sdl_opengl3_example/main.cpp
#	examples/vulkan_example/main.cpp
This commit is contained in:
omar
2018-02-06 20:16:03 +01:00
24 changed files with 122 additions and 69 deletions

View File

@ -570,6 +570,7 @@ struct ImGuiNextWindowData
struct ImGuiContext
{
bool Initialized;
bool FontAtlasOwnedByContext; // Io.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
ImGuiIO IO;
ImGuiStyle Style;
ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
@ -706,11 +707,13 @@ struct ImGuiContext
int WantTextInputNextFrame;
char TempBuffer[1024*3+1]; // temporary text buffer
ImGuiContext() : OverlayDrawList(NULL)
ImGuiContext(ImFontAtlas* shared_font_atlas) : OverlayDrawList(NULL)
{
Initialized = false;
Font = NULL;
FontSize = FontBaseSize = 0.0f;
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
Time = 0.0f;
FrameCount = 0;
@ -1022,7 +1025,8 @@ namespace ImGui
IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow* window);
IMGUI_API void Initialize();
IMGUI_API void Initialize(ImGuiContext* context);
IMGUI_API void Shutdown(ImGuiContext* context); // Since 1.54 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().
IMGUI_API void MarkIniSettingsDirty();
IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name);