Viewport: WIP for Tooltips, Popups, Menus to create their own viewport. Resizing a window allows it to leave the main viewport. (#1542)

This commit is contained in:
omar
2018-04-19 13:12:02 +02:00
parent 1c385c2ca4
commit 637d9c42bf
3 changed files with 147 additions and 69 deletions

View File

@ -134,10 +134,10 @@ int main(int, char**)
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
io.ConfigFlags |= ImGuiConfigFlags_DpiEnableScaleFonts;
io.ConfigFlags |= ImGuiConfigFlags_DpiEnableScaleViewports;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
ImGui_ImplWin32_Init(hwnd);
ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
@ -145,6 +145,8 @@ int main(int, char**)
// Setup style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
ImGuiStyle& style = ImGui::GetStyle();
style.WindowRounding = 0.0f;
// Load Fonts
// - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.