You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
32 lines
779 B
C++
32 lines
779 B
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "VREditorWidgetComponent.h"
|
|
|
|
UVREditorWidgetComponent::UVREditorWidgetComponent(const FObjectInitializer& ObjectInitializer)
|
|
: Super( ObjectInitializer )
|
|
{
|
|
bIsHovering = false;
|
|
DrawingPolicy = EVREditorWidgetDrawingPolicy::Always;
|
|
bHasEverDrawn = false;
|
|
bSelectable = false;
|
|
}
|
|
|
|
bool UVREditorWidgetComponent::ShouldDrawWidget() const
|
|
{
|
|
if ( DrawingPolicy == EVREditorWidgetDrawingPolicy::Always ||
|
|
(DrawingPolicy == EVREditorWidgetDrawingPolicy::Hovering && bIsHovering) ||
|
|
!bHasEverDrawn )
|
|
{
|
|
return Super::ShouldDrawWidget();
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void UVREditorWidgetComponent::DrawWidgetToRenderTarget(float DeltaTime)
|
|
{
|
|
bHasEverDrawn = true;
|
|
|
|
Super::DrawWidgetToRenderTarget(DeltaTime);
|
|
}
|