添加模式切换模式UI

This commit is contained in:
997146918 2025-10-09 11:35:42 +08:00
parent dac6c48d38
commit 76cb4541b8
6 changed files with 55 additions and 48 deletions

View File

@ -21,6 +21,38 @@
"BuildId": "37670630" "BuildId": "37670630"
}, },
"BuildProducts": [ "BuildProducts": [
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFish.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFish.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFishEditor.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor-DeskMode.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor-DeskMode.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{ {
"Path": "$(EngineDir)/Binaries/ThirdParty/USD/UsdResources/Win64/plugins/ar/resources/plugInfo.json", "Path": "$(EngineDir)/Binaries/ThirdParty/USD/UsdResources/Win64/plugins/ar/resources/plugInfo.json",
"Type": "RequiredResource" "Type": "RequiredResource"
@ -8008,41 +8040,17 @@
{ {
"Path": "$(EngineDir)/Plugins/XGEController/Binaries/Win64/UnrealEditor.modules", "Path": "$(EngineDir)/Plugins/XGEController/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource" "Type": "RequiredResource"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFish.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFish.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFishEditor.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor-ProjectFishEditor.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor-DeskMode.dll",
"Type": "DynamicLibrary"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor-DeskMode.pdb",
"Type": "SymbolFile"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/Binaries/Win64/UnrealEditor.modules",
"Type": "RequiredResource"
} }
], ],
"RuntimeDependencies": [ "RuntimeDependencies": [
{
"Path": "$(ProjectDir)/Plugins/DeskMode/DeskMode.uplugin",
"Type": "UFS"
},
{
"Path": "$(ProjectDir)/ProjectFish.uproject",
"Type": "UFS"
},
{ {
"Path": "$(EngineDir)/Binaries/ThirdParty/DbgHelp/dbghelp.dll", "Path": "$(EngineDir)/Binaries/ThirdParty/DbgHelp/dbghelp.dll",
"Type": "NonUFS" "Type": "NonUFS"
@ -33770,14 +33778,6 @@
{ {
"Path": "$(EngineDir)/Plugins/XGEController/XGEController.uplugin", "Path": "$(EngineDir)/Plugins/XGEController/XGEController.uplugin",
"Type": "UFS" "Type": "UFS"
},
{
"Path": "$(ProjectDir)/Plugins/DeskMode/DeskMode.uplugin",
"Type": "UFS"
},
{
"Path": "$(ProjectDir)/ProjectFish.uproject",
"Type": "UFS"
} }
], ],
"BuildPlugins": [ "BuildPlugins": [

Binary file not shown.

View File

@ -208,7 +208,7 @@ void UWindowTransparency::SetWIndowsTopmost(bool bSetWindowTopmost)
void UWindowTransparency::Tick(float DeltaTime) void UWindowTransparency::Tick(float DeltaTime)
{ {
if (!bIsClickThroughStateOS) if (!bIsClickThroughStateOS && !bIsMouseOverOpaqueAreaLogic)
{ {
return; return;
} }
@ -280,17 +280,24 @@ FVector2D UWindowTransparency::GetMousePositionInWindow(bool& bMousePosSuccess)
bool UWindowTransparency::SimulateGameRaycastUnderMouse(FVector2D MousePos) bool UWindowTransparency::SimulateGameRaycastUnderMouse(FVector2D MousePos)
{ {
UWorld* World = GetWorld();
APlayerController* PC = nullptr; APlayerController* PC = nullptr;
if (World) if (GEngine && GEngine->GameViewport)
{ {
PC = Cast<APlayerController>(GetWorld()->GetFirstLocalPlayerFromController()); UWorld* World = GEngine->GameViewport->GetWorld();
if (World)
{
PC = World->GetFirstPlayerController();
}
} }
if (!PC)
{ // if (World)
// {
// PC = Cast<APlayerController>(GetWorld()->GetFirstLocalPlayerFromController());
// }
if (!PC)
{
return false; return false;
} }
//检测3D世界是否有碰撞 //检测3D世界是否有碰撞
FHitResult HitResult3D; FHitResult HitResult3D;
FCollisionQueryParams CollisionParams3D(SCENE_QUERY_STAT(WindowTransparencyRaycast3D), true); FCollisionQueryParams CollisionParams3D(SCENE_QUERY_STAT(WindowTransparencyRaycast3D), true);