From c45e7700fa93d568dff9e31be4efdc0e1bc5845d Mon Sep 17 00:00:00 2001 From: Eunki, Hong Date: Thu, 26 Oct 2023 13:38:48 +0900 Subject: [PATCH] Fix demo app s.t. don't use z=0 scale --- examples/inherit-test/inherit-test-example.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/inherit-test/inherit-test-example.cpp b/examples/inherit-test/inherit-test-example.cpp index 226fe2a..69e9d6b 100644 --- a/examples/inherit-test/inherit-test-example.cpp +++ b/examples/inherit-test/inherit-test-example.cpp @@ -216,9 +216,9 @@ public: mParent.SetBackgroundColor(Color::BLUE); mParent.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); mParent.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER); - mParent.SetProperty(Actor::Property::SIZE, parentViewSize); + mParent.SetProperty(Actor::Property::SIZE, Vector3(parentViewSize)); mParent.SetProperty(Actor::Property::POSITION, Vector3::ZERO); - mParent.SetProperty(Actor::Property::SCALE, parentViewScale); + mParent.SetProperty(Actor::Property::SCALE, Vector3(parentViewScale.x, parentViewScale.y, 1.0f)); Vector3 parentOrigin = PARENT_ORIGIN_LIST[mParentOriginIndex]; Vector3 anchorPoint = ANCHOR_POINT_LIST[mAnchorPointIndex]; @@ -234,9 +234,9 @@ public: mCurrent.SetBackgroundColor(Color::RED); mCurrent.SetProperty(Actor::Property::PARENT_ORIGIN, parentOrigin); mCurrent.SetProperty(Actor::Property::ANCHOR_POINT, anchorPoint); - mCurrent.SetProperty(Actor::Property::SIZE, currentViewSize); - mCurrent.SetProperty(Actor::Property::POSITION, currentViewPosition); - mCurrent.SetProperty(Actor::Property::SCALE, currentViewScale); + mCurrent.SetProperty(Actor::Property::SIZE, Vector3(currentViewSize)); + mCurrent.SetProperty(Actor::Property::POSITION, Vector3(currentViewPosition)); + mCurrent.SetProperty(Actor::Property::SCALE, Vector3(currentViewScale.x, currentViewScale.y, 1.0f)); mCurrent.SetProperty(Actor::Property::INHERIT_POSITION, inheritPosition); mCurrent.SetProperty(Actor::Property::INHERIT_SCALE, inheritScale); -- libgit2 0.21.4