diff --git a/imgui-borderless-win32/BorderlessWindow.cpp b/imgui-borderless-win32/BorderlessWindow.cpp index 84da5f9..0d2a913 100644 --- a/imgui-borderless-win32/BorderlessWindow.cpp +++ b/imgui-borderless-win32/BorderlessWindow.cpp @@ -189,12 +189,12 @@ VOID BorderlessWindow::set_client_area(std::vector&& client_rects) UINT BorderlessWindow::get_width() const { - return 0; + return m_uWidth; } UINT BorderlessWindow::get_height() const { - return 0; + return m_uHeight; } #ifdef BORDERLESS_USE_IMGUI diff --git a/imgui-borderless-win32/imgui.ini b/imgui-borderless-win32/imgui.ini index 8572450..b8612cb 100644 --- a/imgui-borderless-win32/imgui.ini +++ b/imgui-borderless-win32/imgui.ini @@ -4,7 +4,7 @@ Size=1280,720 Collapsed=0 [Window][Debug##Default] -Pos=400,9 +Pos=198,0 Size=400,400 Collapsed=0 @@ -14,8 +14,8 @@ Size=260,291 Collapsed=0 [Window][Dear ImGui Demo] -Pos=979,0 -Size=301,720 +Pos=1073,0 +Size=207,720 Collapsed=0 DockId=0x00000007,0 @@ -43,8 +43,8 @@ Collapsed=0 DockId=0x00000002,0 [Window][Example: Simple overlay] -Pos=490,604 -Size=339,46 +Pos=355,86 +Size=346,46 Collapsed=0 [Window][Borderless Demo] @@ -53,7 +53,7 @@ Size=224,316 Collapsed=0 [Window][Borderless Settings] -Pos=213,76 +Pos=224,80 Size=109,58 Collapsed=0 @@ -73,22 +73,22 @@ Size=232,401 Collapsed=0 [Window][DWM Accent State] -Pos=12,79 +Pos=18,85 Size=179,196 Collapsed=0 [Window][DWM Gradient] -Pos=8,360 +Pos=20,291 Size=224,293 Collapsed=0 [Window][DWM Accent Flags] -Pos=11,11 +Pos=354,9 Size=312,58 Collapsed=0 [Window][DWM Animation id] -Pos=325,11 +Pos=13,11 Size=312,58 Collapsed=0 @@ -124,6 +124,11 @@ Pos=29,74 Size=224,58 Collapsed=0 +[Window][glClearColor] +Pos=266,291 +Size=224,293 +Collapsed=0 + [Table][0x47600645,3] RefScale=16 Column 0 Width=56 @@ -208,15 +213,15 @@ Column 1 Width=84 Column 2 Width=126 [Docking][Data] -DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=358,164 Size=1280,720 Split=X - DockNode ID=0x00000003 Parent=0x8B93E3BD SizeRef=977,720 Split=X +DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=296,111 Size=1280,720 Split=X + DockNode ID=0x00000003 Parent=0x8B93E3BD SizeRef=836,720 Split=X DockNode ID=0x00000001 Parent=0x00000003 SizeRef=955,720 Split=Y DockNode ID=0x00000009 Parent=0x00000001 SizeRef=1280,591 Split=X DockNode ID=0x00000005 Parent=0x00000009 SizeRef=875,774 CentralNode=1 Selected=0xE87781F4 DockNode ID=0x00000006 Parent=0x00000009 SizeRef=154,774 Selected=0xD279B26D DockNode ID=0x0000000A Parent=0x00000001 SizeRef=1280,185 Selected=0xDE6E0C33 DockNode ID=0x00000002 Parent=0x00000003 SizeRef=323,720 Selected=0xE87781F4 - DockNode ID=0x00000004 Parent=0x8B93E3BD SizeRef=301,720 Split=Y Selected=0xE87781F4 + DockNode ID=0x00000004 Parent=0x8B93E3BD SizeRef=207,720 Split=Y Selected=0xE87781F4 DockNode ID=0x00000007 Parent=0x00000004 SizeRef=185,360 Selected=0xE87781F4 DockNode ID=0x00000008 Parent=0x00000004 SizeRef=185,358 Selected=0xFCA0E6F2 diff --git a/imgui-borderless-win32/main.cpp b/imgui-borderless-win32/main.cpp index bff5a5c..edb30f6 100644 --- a/imgui-borderless-win32/main.cpp +++ b/imgui-borderless-win32/main.cpp @@ -170,7 +170,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, // Main loop bool done = false; MSG msg; - ImVec4 clear_color = ImVec4(.0f, .0f, .0f, 0.f); + ImVec4 clear_color = ImVec4(.0f, .0f, .0f, .0f); while (!done) { @@ -246,6 +246,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, gradient_col.m_Value = (((int)(color.w * 255)) << 24) | (((int)(color.z * 255)) << 16) | (((int)(color.y * 255)) << 8) | ((int)(color.x * 255)); ImGui::End(); + ImGui::Begin("glClearColor", 0, window_flags); + ImGui::SeparatorText("glClearColor"); + ImGui::ColorPicker4("##picker", (float*)&clear_color, ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoSmallPreview); + ImGui::End(); + ImGui::Begin("DWM Animation id", 0, window_flags); ImGui::SeparatorText("DWM Animation id"); static SmartProperty animation_id{ 0 }; @@ -302,7 +307,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, // Rendering ImGui::Render(); - glClearColor(0, 0, 0, 0); + //glClearColor(0, 0, 0, 0); + glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); glClear(GL_COLOR_BUFFER_BIT); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());