From 77d495bc6d6f92079fe28718ef5822593281af4b Mon Sep 17 00:00:00 2001 From: badlogic Date: Tue, 24 Jul 2018 15:16:23 +0200 Subject: [PATCH] [ue4] Ported flipX/flipY -> scaleX/scaleY change. See #1142. --- .../Private/SpineSkeletonComponent.cpp | 20 +++++++++---------- .../Public/SpineSkeletonComponent.h | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp index 3ba93e3fc..8a9f5d28a 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp @@ -136,26 +136,26 @@ void USpineSkeletonComponent::SetSlotsToSetupPose () { if (skeleton) spSkeleton_setSlotsToSetupPose(skeleton); } -void USpineSkeletonComponent::SetFlipX (bool flipX) { +void USpineSkeletonComponent::SetScaleX (float scaleX) { CheckState(); - if (skeleton) skeleton->flipX = flipX ? 1 : 0; + if (skeleton) skeleton->scaleX = scaleX; } -bool USpineSkeletonComponent::GetFlipX() { +float USpineSkeletonComponent::GetScaleX() { CheckState(); - if (skeleton) return skeleton->flipX != 0; - return false; + if (skeleton) return skeleton->scaleX; + return 1; } -void USpineSkeletonComponent::SetFlipY(bool flipY) { +void USpineSkeletonComponent::SetScaleY(float scaleY) { CheckState(); - if (skeleton) skeleton->flipY = flipY ? 1 : 0; + if (skeleton) skeleton->scaleY = scaleY; } -bool USpineSkeletonComponent::GetFlipY() { +float USpineSkeletonComponent::GetScaleY() { CheckState(); - if (skeleton) return skeleton->flipY != 0; - return false; + if (skeleton) return skeleton->scaleY; + return 1; } void USpineSkeletonComponent::BeginPlay() { diff --git a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h index 9356f1ae1..140663eac 100644 --- a/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h +++ b/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h @@ -79,16 +79,16 @@ public: void SetSlotsToSetupPose(); UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton") - void SetFlipX(bool flipX); + void SetScaleX(float scaleX); UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton") - bool GetFlipX(); + float GetScaleX(); UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton") - void SetFlipY(bool flipY); + void SetScaleY(float scaleY); UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton") - bool GetFlipY(); + float GetScaleY(); UPROPERTY(BlueprintAssignable, Category = "Components|Spine|Skeleton") FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;