diff --git a/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp b/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp index 2685e08e4b8d766cadea1404b1057f71ff6308dc..a06ffa6173678649b067f67a36835c97cc8f15be 100644 --- a/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp +++ b/Source/WidgetInteraction/Private/VRWidgetInteractionComponent.cpp @@ -1,18 +1,16 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "RwthComponent.h" +#include "VRWidgetInteractionComponent.h" + #include "Runtime/InputCore/Classes/InputCoreTypes.h" #include "Runtime/Engine/Classes/Components/InputComponent.h" #include "VirtualRealityPawn.h" -URwthComponent::URwthComponent() -{ - -} +UVRWidgetInteractionComponent::UVRWidgetInteractionComponent() {} -void URwthComponent::Init() +void UVRWidgetInteractionComponent::Init() { - SetVisibility(true); + SetVisibility(true); InteractionDistance = 1000000.0f; auto input_cmp = dynamic_cast<UInputComponent*>(GetOwner()->GetComponentByClass(UInputComponent::StaticClass())); @@ -23,11 +21,11 @@ void URwthComponent::Init() RegisterComponent(); } -void URwthComponent::SetVisibility(bool visible) { +void UVRWidgetInteractionComponent::SetVisibility(bool visible) { bShowDebug = visible; } -void URwthComponent::OnFire(bool val) +void UVRWidgetInteractionComponent::OnFire(bool val) { if (val == true) PressPointerKey(EKeys::LeftMouseButton); diff --git a/Source/WidgetInteraction/Public/VRWidgetInteractionComponent.h b/Source/WidgetInteraction/Public/VRWidgetInteractionComponent.h index d5fda411e5ad92d4c1b3d9ed6f4a6e9fa4c9f0ed..76360f28ec22c400beef0cec16f23b66318919dc 100644 --- a/Source/WidgetInteraction/Public/VRWidgetInteractionComponent.h +++ b/Source/WidgetInteraction/Public/VRWidgetInteractionComponent.h @@ -4,21 +4,21 @@ #include "CoreMinimal.h" #include "Components/WidgetInteractionComponent.h" -#include "RwthComponent.generated.h" +#include "VRWidgetInteractionComponent.generated.h" /** * */ UCLASS() -class WIDGETINTERACTION_API URwthComponent : public UWidgetInteractionComponent +class WIDGETINTERACTION_API UVRWidgetInteractionComponent : public UWidgetInteractionComponent { GENERATED_BODY() public: - URwthComponent(); + UVRWidgetInteractionComponent(); void Init(); - void SetVisibility(bool visible); + void SetVisibility(bool visible); protected: void OnFire(bool val); diff --git a/Source/WidgetInteraction/Public/WidgetInteraction.h b/Source/WidgetInteraction/Public/WidgetInteraction.h index b9ee1e01fd64df7d84cbfc9ea326f86c27a535b2..b970b959384354ea673e8b1c4217bf0037dbbadc 100644 --- a/Source/WidgetInteraction/Public/WidgetInteraction.h +++ b/Source/WidgetInteraction/Public/WidgetInteraction.h @@ -4,7 +4,7 @@ #include "CoreMinimal.h" #include "VirtualRealityPawn.h" -#include "RwthComponent.h" +#include "VRWidgetInteractionComponent.h" #include "Modules/ModuleManager.h" class WIDGETINTERACTION_API FWidgetInteractionModule : public IModuleInterface @@ -17,7 +17,7 @@ public: UFUNCTION() void OnWorldTickStart(ELevelTick, float); - URwthComponent* GetWidgetInteractionComponent(); + UVRWidgetInteractionComponent* GetWidgetInteractionComponent(); private: void CreateWidgetInteraction(USceneComponent * parent, AVirtualRealityPawn* outer); @@ -25,6 +25,6 @@ private: private: TBaseDelegate<void, ELevelTick, float> on_world_tick_start_delegate_; - URwthComponent * widget_interaction_cmp_; - UWorld* last_world; + UVRWidgetInteractionComponent * widget_interaction_cmp_; + UWorld* last_world; };