Explorar o código

fixed input focused

meemknight %!s(int64=3) %!d(string=hai) anos
pai
achega
128a0208bd

+ 5 - 2
Pika/core/pikaRuntime/containerManager/containerManager.cpp

@@ -419,8 +419,11 @@ void pika::ContainerManager::update(pika::LoadedDll &loadedDll, pika::PikaWindow
 					//https://github.com/ocornut/imgui/issues/5882
 					ImGuiViewport *viewPort = ImGui::GetWindowViewport();
 					auto io = ImGui::GetIO();
-					//windowInput.hasFocus = ImGui::GetPlatformIO().Platform_GetWindowFocus(viewPort) && !io.AppFocusLost;
-					windowInput.hasFocus = windowInput.hasFocus && !io.AppFocusLost;
+					
+					windowInput.hasFocus = viewPort->PlatformUserData && ImGui::GetPlatformIO().Platform_GetWindowFocus(viewPort) && !io.AppFocusLost;
+					
+					
+					//windowInput.hasFocus = windowInput.hasFocus && !io.AppFocusLost;
 				}
 				
 

+ 1 - 1
Pika/pluggins/pluggins/immageViewer.h

@@ -90,7 +90,7 @@ struct ImmageViewer: public Container
 		{
 
 			float xsize = std::max((int)(s.x*zoom) - 10, (int)(100*zoom));
-			float aspect = 1.f;
+			float aspect = 1.f; //todo
 
 			ImGui::Image((void *)texture.id, {xsize,xsize / aspect},
 				{0, 1}, {1, 0});

+ 2 - 2
Pika/resources/logs.txt

@@ -1,2 +1,2 @@
-#2022-11-22 18:37:12: Created container: Gameplay
-#2022-11-22 18:37:29: Destroyed continer: Gameplay #1
+#2022-12-07 10:07:57: Created container: Gameplay
+#2022-12-07 10:08:27: Destroyed continer: Gameplay #1