Skip to content
Open

4.24 #15

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/Swipe/Classes/SwipeComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#pragma once

#include "Components/ActorComponent.h"
#include "SwipeComponent.generated.h"

UCLASS(ClassGroup = Input, HideCategories = (Activation, "Components|Activation", Collision), meta = (BlueprintSpawnableComponent))
Expand Down
2 changes: 2 additions & 0 deletions Source/Swipe/Classes/SwipeDelegates.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#pragma once

#include "UObject/Object.h"
#include "UObject/ScriptMacros.h"
#include "SwipeDelegates.generated.h"

UCLASS(NotBlueprintable)
Expand Down
2 changes: 2 additions & 0 deletions Source/Swipe/Classes/SwipeSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#pragma once

#include "UObject/Object.h"
#include "UObject/ScriptMacros.h"
#include "SwipeSettings.generated.h"

UCLASS(config = Engine, defaultconfig)
Expand Down
35 changes: 34 additions & 1 deletion Source/Swipe/Classes/SwipeViewportClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#pragma once

#include "UObject/Object.h"
#include "Engine/GameViewportClient.h"
#include "SwipeViewportClient.generated.h"

UENUM(BlueprintType)
Expand All @@ -23,13 +25,44 @@ class USwipeViewportClient : public UGameViewportClient {
GENERATED_BODY()

public:
virtual bool InputTouch(FViewport* Viewport,
/*
virtual bool InputTouch(FViewport* Viewport,
int32 ControllerId,
uint32 Handle,
ETouchType::Type Type,
const FVector2D& TouchLocation,
float Force,
FDateTime DeviceTimestamp,
uint32 TouchpadIndex) override;


virtual bool InputTouch
(
FViewport * Viewport,
int32 ControllerId,
uint32 Handle,
ETouchType::Type Type,
const FVector2D & TouchLocation,
float Force,
FDateTime DeviceTimestamp,
uint32 TouchpadIndex
)
*/
virtual bool InputTouch(FViewport* InViewport,
int32 ControllerId,
uint32 Handle,
ETouchType::Type Type,
const FVector2D& TouchLocation,
float Force,
FDateTime DeviceTimestamp,
uint32 TouchpadIndex) override;
/*bool InputTouch(FViewport* Viewport,
int32 ControllerId,
uint32 Handle,
ETouchType::Type Type,
const FVector2D& TouchLocation,
FDateTime DeviceTimestamp,
uint32 TouchpadIndex) override;*/

private:
bool bSwiping;
Expand Down
1 change: 1 addition & 0 deletions Source/Swipe/Private/SwipeComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright (c) 2015 Get Set Games Inc. All rights reserved.
//

#include "SwipeComponent.h"
#include "SwipePrivatePCH.h"

void USwipeComponent::OnRegister()
Expand Down
1 change: 1 addition & 0 deletions Source/Swipe/Private/SwipeDelegates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright (c) 2015 Get Set Games Inc. All rights reserved.
//

#include "SwipeDelegates.h"
#include "SwipePrivatePCH.h"

USwipeDelegates::FTouchDelegate USwipeDelegates::TouchBeganDelegate;
Expand Down
5 changes: 1 addition & 4 deletions Source/Swipe/Private/SwipePrivatePCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@

#pragma once

#include "CoreUObject.h"
#include "Engine.h"

#include "ISwipe.h"

// You should place include statements to your module's private header files here. You only need to
// add includes for headers that are used in most of your module's source files though.

DECLARE_LOG_CATEGORY_EXTERN(LogSwipe, Log, All);

#include "SwipeClasses.h"
#include "SwipeClasses.h"
1 change: 1 addition & 0 deletions Source/Swipe/Private/SwipeSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright (c) 2015 Get Set Games Inc. All rights reserved.
//

#include "SwipeSettings.h"
#include "SwipePrivatePCH.h"

USwipeSettings::USwipeSettings(const FObjectInitializer& ObjectInitializer)
Expand Down
7 changes: 5 additions & 2 deletions Source/Swipe/Private/SwipeViewportClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
// Copyright (c) 2015 Get Set Games Inc. All rights reserved.
//

#include "SwipeViewportClient.h"
#include "SwipePrivatePCH.h"
#include "Runtime/Engine/Classes/Engine/UserInterfaceSettings.h"


bool USwipeViewportClient::InputTouch(FViewport* InViewport,
int32 ControllerId,
uint32 Handle,
ETouchType::Type Type,
const FVector2D& TouchLocation,
float Force,
FDateTime DeviceTimestamp,
uint32 TouchpadIndex)
{
Expand Down Expand Up @@ -119,7 +122,7 @@ bool USwipeViewportClient::InputTouch(FViewport* InViewport,
FTimerHandle TapHandler;
FTimerDelegate TapHandlerDelegate;
TapHandlerDelegate.BindUObject(this, &USwipeViewportClient::ResetTapHandler);
UWorld* World = GetWorld();
World = GetWorld();
if (World)
{
World->GetTimerManager().SetTimer(TapHandler, TapHandlerDelegate, SwipeSettings->MaxTimeBetweenTaps, false);
Expand All @@ -134,7 +137,7 @@ bool USwipeViewportClient::InputTouch(FViewport* InViewport,
break;
}

bool bResult = Super::InputTouch(InViewport, ControllerId, Handle, Type, TouchLocation, DeviceTimestamp, TouchpadIndex);
bool bResult = Super::InputTouch(InViewport, ControllerId, Handle, Type, TouchLocation, false, DeviceTimestamp, TouchpadIndex);

return bResult;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Swipe/Public/ISwipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#include "ModuleManager.h"
#include "Modules/ModuleManager.h"

class ISwipe : public IModuleInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Swipe/Swipe.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UnrealBuildTool.Rules
{
public class Swipe : ModuleRules
{
public Swipe(TargetInfo Target)
public Swipe(ReadOnlyTargetRules Target) : base(Target)
{
PublicIncludePaths.AddRange(
new string[] {
Expand Down