|
@@ -295,6 +295,18 @@ int main(int, char**)
|
|
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
|
|
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
|
|
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge;
|
|
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge;
|
|
|
|
|
|
|
|
+ // Setup Dear ImGui style
|
|
|
|
+ ImGui::StyleColorsDark();
|
|
|
|
+ //ImGui::StyleColorsClassic();
|
|
|
|
+
|
|
|
|
+ // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
|
|
|
+ ImGuiStyle& style = ImGui::GetStyle();
|
|
|
|
+ if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
|
|
|
+ {
|
|
|
|
+ style.WindowRounding = 0.0f;
|
|
|
|
+ style.Colors[ImGuiCol_WindowBg].w = 1.0f;
|
|
|
|
+ }
|
|
|
|
+
|
|
// Setup Platform/Renderer bindings
|
|
// Setup Platform/Renderer bindings
|
|
ImGui_ImplWin32_Init(hwnd);
|
|
ImGui_ImplWin32_Init(hwnd);
|
|
ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT,
|
|
ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT,
|
|
@@ -302,10 +314,6 @@ int main(int, char**)
|
|
g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(),
|
|
g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(),
|
|
g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
|
|
g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
|
|
|
|
|
|
- // Setup Style
|
|
|
|
- ImGui::StyleColorsDark();
|
|
|
|
- //ImGui::StyleColorsClassic();
|
|
|
|
-
|
|
|
|
// Load Fonts
|
|
// 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.
|
|
// - 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.
|
|
// - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
|
|
// - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
|