You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: 3648 unity files Total CPU Time: 47886.140625 s Total time in Parallel executor: 498.81 seconds After: 3548 unity files Total CPU Time: 46643.828125 s Total time in Parallel executor: 486.06 seconds #jira #preflight [CL 22173263 by marc audy in ue5-main branch]
64 lines
1.3 KiB
C++
64 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "BaseTools/SingleClickTool.h"
|
|
#include "InteractiveToolManager.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(SingleClickTool)
|
|
|
|
#define LOCTEXT_NAMESPACE "USingleClickTool"
|
|
|
|
|
|
|
|
/*
|
|
* ToolBuilder
|
|
*/
|
|
|
|
bool USingleClickToolBuilder::CanBuildTool(const FToolBuilderState& SceneState) const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
UInteractiveTool* USingleClickToolBuilder::BuildTool(const FToolBuilderState& SceneState) const
|
|
{
|
|
USingleClickTool* NewTool = NewObject<USingleClickTool>(SceneState.ToolManager);
|
|
return NewTool;
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
* Tool
|
|
*/
|
|
|
|
|
|
void USingleClickTool::Setup()
|
|
{
|
|
UInteractiveTool::Setup();
|
|
|
|
// add default button input behaviors for devices
|
|
USingleClickInputBehavior* MouseBehavior = NewObject<USingleClickInputBehavior>();
|
|
MouseBehavior->Initialize(this);
|
|
AddInputBehavior(MouseBehavior);
|
|
}
|
|
|
|
|
|
FInputRayHit USingleClickTool::IsHitByClick(const FInputDeviceRay& ClickPos)
|
|
{
|
|
return FInputRayHit(0.0f);
|
|
}
|
|
|
|
|
|
void USingleClickTool::OnClicked(const FInputDeviceRay& ClickPos)
|
|
{
|
|
// print debug message
|
|
GetToolManager()->DisplayMessage(
|
|
FText::Format(LOCTEXT("OnClickedMessage", "USingleClickTool::OnClicked at ({0},{1})"),
|
|
FText::AsNumber(ClickPos.ScreenPosition.X), FText::AsNumber(ClickPos.ScreenPosition.Y)),
|
|
EToolMessageLevel::Internal );
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|